diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-02 15:29:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-01-02 20:29:10 +0100 |
| commit | 6cda037324ccaf7a8df142d037fa88520fb80f35 (patch) | |
| tree | ff709633436d000697193aac2e8a5882b24f0f47 /src/lib/video_content.cc | |
| parent | afbe4ce5dd551149f931c41bf27c22ef1f55155f (diff) | |
Fix errors when a custom size is given which is larger than the container (#2404).
Diffstat (limited to 'src/lib/video_content.cc')
| -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 (); |
