Restore old behaviour of "no-stretch" mode with crop.
authorCarl Hetherington <cth@carlh.net>
Sun, 9 Mar 2014 22:10:25 +0000 (22:10 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 9 Mar 2014 22:10:25 +0000 (22:10 +0000)
Reported-by: Markus Raab
ChangeLog
src/lib/video_content.cc

index 4bb6b732b6bf9aa0eb3799c6fc86125fcf90a6ff..5ce1b0eb8085fc088552dcec3a7c9e6118fa15f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2014-03-09  Carl Hetherington  <cth@carlh.net>
 
+       * Restore old behaviour of "no-stretch" mode with crop.
+
        * Fix display of no-scale display mode in the player.
 
 2014-03-08  Carl Hetherington  <cth@carlh.net>
index 82f817654db3f48575f5cb4bad16cd86e283ee00..966b8e8b34e4a32bd3e1d7e1c803f9624cd2e30f 100644 (file)
@@ -453,9 +453,11 @@ VideoContentScale::size (shared_ptr<const VideoContent> c, libdcp::Size display_
                return fit_ratio_within (_ratio->ratio (), display_container);
        }
 
+       libdcp::Size const ac = c->video_size_after_crop ();
+
        /* Force scale if the film_container is smaller than the content's image */
-       if (_scale || film_container.width < c->video_size().width || film_container.height < c->video_size().height) {
-               return fit_ratio_within (c->video_size().ratio (), display_container);
+       if (_scale || film_container.width < ac.width || film_container.height < ac.height) {
+               return fit_ratio_within (ac.ratio (), display_container);
        }
 
        /* Scale the image so that it will be in the right place in film_container, even if display_container is a