Commit 0cb19c30 authored by Nicolas George's avatar Nicolas George

lavf/concatdec: clear extradata when inserting h264_mp4toannexb bsf.

Fix remuxing H.264-in-MP4 to Matroska, possibly others.
parent b8fa374f
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment