Certain AVCodecParameters, like the contents of the extradata, may be changed by the init() function of any of the bitstream filters in the chain.
Signed-off-by: James Almer <jamr...@gmail.com> --- Things worked fine without this until now by pure chance. vp9_superframe_split doesn't use extradata, and those hardware decoders inserting h264_mp4toannexb and hevc_mp4toannexb passed the extradata to functions that could handle it unfiltered. libavcodec/decode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 6a3a4df179..0c8cdd5bd2 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -246,6 +246,10 @@ static int bsfs_init(AVCodecContext *avctx) goto fail; } + ret = avcodec_parameters_to_context(avctx, s->bsfs[s->nb_bsfs - 1]->par_out); + if (ret < 0) + return ret; + return 0; fail: ff_decode_bsfs_uninit(avctx); -- 2.18.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel