diff options
author | Nicolas George <george@nsup.org> | 2016-04-25 13:46:10 +0200 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2016-04-26 16:58:59 +0200 |
commit | 0cb19c30c6a14418eaa6858db303602815fe3ab1 (patch) | |
tree | 71a31dea36e3ecfcc61c48d0a9ca979cab491039 /libavformat/concatdec.c | |
parent | b8fa374fb6eba995a9d5dd50f714f9faff43b81b (diff) | |
download | ffmpeg-0cb19c30c6a14418eaa6858db303602815fe3ab1.tar.gz |
lavf/concatdec: clear extradata when inserting h264_mp4toannexb bsf.
Fix remuxing H.264-in-MP4 to Matroska, possibly others.
Diffstat (limited to 'libavformat/concatdec.c')
-rw-r--r-- | libavformat/concatdec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index b2bab55f70..b3a430e5a0 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -214,6 +214,12 @@ static int detect_stream_specific(AVFormatContext *avf, int idx) if (!cs->avctx) return AVERROR(ENOMEM); + /* This really should be part of the bsf work. + Note: input bitstream filtering will not work with bsf that + create extradata from the first packet. */ + av_freep(&st->codecpar->extradata); + st->codecpar->extradata_size = 0; + ret = avcodec_parameters_to_context(cs->avctx, st->codecpar); if (ret < 0) { avcodec_free_context(&cs->avctx); |