summaryrefslogtreecommitdiff
path: root/src/mpeg2_transcode.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-11 17:22:53 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-11 17:22:53 +0100
commitdf3d6312ac40b2cf3a846c4bb741da8510eec126 (patch)
treed7c8f8a84985afe7f0d43c9c2241eee515ff538f /src/mpeg2_transcode.cc
parent6d8b47e4dfb4c00dae56e5ca275b70b16b40a7a8 (diff)
Set rc_max_rate so that mediainfo reports the correct values.
Diffstat (limited to 'src/mpeg2_transcode.cc')
-rw-r--r--src/mpeg2_transcode.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mpeg2_transcode.cc b/src/mpeg2_transcode.cc
index 0ac2c1af..84d2d5a4 100644
--- a/src/mpeg2_transcode.cc
+++ b/src/mpeg2_transcode.cc
@@ -162,6 +162,7 @@ MPEG2Compressor::MPEG2Compressor(dcp::Size size, int video_frame_rate, int64_t b
_context->time_base = AVRational{1, video_frame_rate};
_context->pix_fmt = AV_PIX_FMT_YUV420P;
_context->bit_rate = bit_rate;
+ _context->rc_max_rate = bit_rate;
int const r = avcodec_open2(_context, _codec, nullptr);
if (r < 0) {