summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-02-08 20:57:54 +0100
committerCarl Hetherington <cth@carlh.net>2026-02-08 20:57:54 +0100
commitae5d6b702af178452f84b85dfa13b62be577e3f5 (patch)
tree5ca8a7b9e8d2daa0446aec49beb2a737a1372446
parent4360e6cb73b4d966a2d9a9aaa377d2f7d5291d8f (diff)
Don't respect template maximum video rate if the configured maximum is lower.
Otherwise the GUI shows the lower rate but the Film contains the higher one. Since the recent change to stop the maximum bit rates being set below the standard maximum this should only happen if the user has configured a non-standard rate and then made a template with a yet higher rate.
-rw-r--r--src/lib/film.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index fbeca53fa..f65e34368 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -2175,7 +2175,7 @@ Film::use_template(optional<string> name)
_container = _template_film->_container;
_resolution = _template_film->_resolution;
for (auto encoding: { VideoEncoding::JPEG2000, VideoEncoding::MPEG2 }) {
- _video_bit_rate[encoding] = _template_film->_video_bit_rate[encoding];
+ _video_bit_rate[encoding] = std::min(_template_film->_video_bit_rate[encoding], Config::instance()->maximum_video_bit_rate(encoding));
}
_video_frame_rate = _template_film->_video_frame_rate;
_encrypt_picture = _template_film->_encrypt_picture;