| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Microsoft RTP/ASF support. | 2 * Microsoft RTP/ASF support. |
| 3 * Copyright (c) 2008 Ronald S. Bultje | 3 * Copyright (c) 2008 Ronald S. Bultje |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 * the next ASF packet that can be read from this payload | 223 * the next ASF packet that can be read from this payload |
| 224 * data alone. This is commonly the same as the payload size, | 224 * data alone. This is commonly the same as the payload size, |
| 225 * but could be less in case of packet splitting (i.e. | 225 * but could be less in case of packet splitting (i.e. |
| 226 * multiple ASF packets in one RTP packet). | 226 * multiple ASF packets in one RTP packet). |
| 227 */ | 227 */ |
| 228 | 228 |
| 229 int cur_len = start_off + len_off - off; | 229 int cur_len = start_off + len_off - off; |
| 230 int prev_len = out_len; | 230 int prev_len = out_len; |
| 231 out_len += cur_len; | 231 out_len += cur_len; |
| 232 asf->buf = av_realloc(asf->buf, out_len); | 232 asf->buf = av_realloc(asf->buf, out_len); |
| 233 memcpy(asf->buf + prev_len, buf + off, cur_len); | 233 memcpy(asf->buf + prev_len, buf + off, |
| 234 FFMIN(cur_len, len - off)); |
| 234 url_fskip(pb, cur_len); | 235 url_fskip(pb, cur_len); |
| 235 } | 236 } |
| 236 } | 237 } |
| 237 | 238 |
| 238 init_packetizer(pb, asf->buf, out_len); | 239 init_packetizer(pb, asf->buf, out_len); |
| 239 pb->pos += rt->asf_pb_pos; | 240 pb->pos += rt->asf_pb_pos; |
| 240 pb->eof_reached = 0; | 241 pb->eof_reached = 0; |
| 241 rt->asf_ctx->pb = pb; | 242 rt->asf_ctx->pb = pb; |
| 242 } | 243 } |
| 243 | 244 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 .codec_type = t, \ | 284 .codec_type = t, \ |
| 284 .codec_id = CODEC_ID_NONE, \ | 285 .codec_id = CODEC_ID_NONE, \ |
| 285 .parse_sdp_a_line = asfrtp_parse_sdp_line, \ | 286 .parse_sdp_a_line = asfrtp_parse_sdp_line, \ |
| 286 .open = asfrtp_new_context, \ | 287 .open = asfrtp_new_context, \ |
| 287 .close = asfrtp_free_context, \ | 288 .close = asfrtp_free_context, \ |
| 288 .parse_packet = asfrtp_parse_packet, \ | 289 .parse_packet = asfrtp_parse_packet, \ |
| 289 }; | 290 }; |
| 290 | 291 |
| 291 RTP_ASF_HANDLER(asf_pfv, "x-asf-pf", AVMEDIA_TYPE_VIDEO); | 292 RTP_ASF_HANDLER(asf_pfv, "x-asf-pf", AVMEDIA_TYPE_VIDEO); |
| 292 RTP_ASF_HANDLER(asf_pfa, "x-asf-pf", AVMEDIA_TYPE_AUDIO); | 293 RTP_ASF_HANDLER(asf_pfa, "x-asf-pf", AVMEDIA_TYPE_AUDIO); |
| OLD | NEW |