[FFmpeg-cvslog] lavf/concatdec: clear extradata when inserting h264_mp4toannexb bsf.
Nicolas George
git at videolan.org
Tue Apr 26 17:05:38 CEST 2016
ffmpeg | branch: master | Nicolas George <george at nsup.org> | Mon Apr 25 13:46:10 2016 +0200| [0cb19c30c6a14418eaa6858db303602815fe3ab1] | committer: Nicolas George
lavf/concatdec: clear extradata when inserting h264_mp4toannexb bsf.
Fix remuxing H.264-in-MP4 to Matroska, possibly others.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cb19c30c6a14418eaa6858db303602815fe3ab1
---
libavformat/concatdec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index b2bab55..b3a430e 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);
More information about the ffmpeg-cvslog
mailing list