Otherwise the muxer could add header data that is based on the old AVCodecParameters that contradicts and potentially nullifies the modifications made to the bitstream.
This brings mpeg2_metadata in line with what is expected of a bitstream filter. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> --- libavcodec/mpeg2_metadata_bsf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/mpeg2_metadata_bsf.c b/libavcodec/mpeg2_metadata_bsf.c index 3f371a028d..458a1f2e61 100644 --- a/libavcodec/mpeg2_metadata_bsf.c +++ b/libavcodec/mpeg2_metadata_bsf.c @@ -249,6 +249,11 @@ static int mpeg2_metadata_init(AVBSFContext *bsf) } } + ff_cbs_update_video_parameters(ctx->cbc, bsf->par_out, -1, -1, -1, + -1, -1, -1, ctx->colour_primaries, + ctx->transfer_characteristics, + ctx->matrix_coefficients, -1, -1); + err = 0; fail: ff_cbs_fragment_reset(ctx->cbc, frag); -- 2.21.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".