diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-02 15:29:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-01-02 17:19:11 +0100 |
| commit | 07515bb7fe9659973ec00da52f9be6d2004f6d70 (patch) | |
| tree | ffc7bda7346ddaad63429cfc140bd4e271ff7b6f /src/lib | |
| parent | 2dd3414e44538327c111d1ad4e6a3db6baa43bbf (diff) | |
Fix errors when a custom size is given which is larger than the container (#2404).2404-assertion
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/video_content.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index c10a94f43..9b39ff01b 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -650,7 +650,10 @@ VideoContent::scaled_size (dcp::Size film_container) } if (_custom_size) { - return *_custom_size; + if (_custom_size->width <= film_container.width && _custom_size->height <= film_container.height) { + return *_custom_size; + } + return fit_ratio_within(_custom_size->ratio(), film_container); } auto size = size_after_crop (); |
