if (s->streams[stream_index]->id == rt->asf_ctx->streams[i]->id) {
*s->streams[stream_index]->codec =
*rt->asf_ctx->streams[i]->codec;
+ s->streams[stream_index]->need_parsing =
+ rt->asf_ctx->streams[i]->need_parsing;
rt->asf_ctx->streams[i]->codec->extradata_size = 0;
rt->asf_ctx->streams[i]->codec->extradata = NULL;
avpriv_set_pts_info(s->streams[stream_index], 32, 1, 1000);
int cur_len = start_off + len_off - off;
int prev_len = out_len;
- void *newmem;
out_len += cur_len;
if (FFMIN(cur_len, len - off) < 0)
return -1;
- newmem = av_realloc(asf->buf, out_len);
- if (!newmem)
- return -1;
- asf->buf = newmem;
+ if ((res = av_reallocp(&asf->buf, out_len)) < 0)
+ return res;
memcpy(asf->buf + prev_len, buf + off,
FFMIN(cur_len, len - off));
avio_skip(pb, cur_len);