[FFmpeg-devel] [PATCH 27/31] mpeg2_metadata: Update AVCodecParameters during init
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Tue Jul 9 04:10:44 EEST 2019
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.rheinhardt at 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
More information about the ffmpeg-devel
mailing list