summaryrefslogtreecommitdiff
path: root/src/lib/player_video.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-02-21 10:47:38 +0100
committerCarl Hetherington <cth@carlh.net>2024-02-21 18:48:53 +0100
commit3ffd0163026be24e5373e0674c3301ed37546e44 (patch)
tree918e6de08fb1efff2098148295fa60a614102c8e /src/lib/player_video.cc
parenta9b1c1cb65e1902a64430977cf698054e131a6f4 (diff)
Make DCPExaminer::size() optional and deal with the consequences.v2.16.78
This means we can fix the case of a VF having no known size in a nice way, in turn fixing problems caused by the fix to #2775.
Diffstat (limited to 'src/lib/player_video.cc')
-rw-r--r--src/lib/player_video.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc
index d45bf9f43..35c5d3daa 100644
--- a/src/lib/player_video.cc
+++ b/src/lib/player_video.cc
@@ -362,8 +362,13 @@ PlayerVideo::reset_metadata (shared_ptr<const Film> film, dcp::Size player_video
_crop = content->video->actual_crop();
_fade = content->video->fade(film, _video_frame.get());
+ auto const size = content->video->scaled_size(film->frame_size());
+ if (!size) {
+ return false;
+ }
+
_inter_size = scale_for_display(
- content->video->scaled_size(film->frame_size()),
+ *size,
player_video_container_size,
film->frame_size(),
content->video->pixel_quanta()