Fix black borders around the preview in some cases (#2331).
[dcpomatic.git] / src / lib / video_content.cc
index de3d3f3a2382e887ba31c10087d1c01834f6a598..1d1d010a95662193bc52ab84e5dacb2b8746fb10 100644 (file)
@@ -660,7 +660,7 @@ VideoContent::scaled_size (dcp::Size film_container)
        }
 
        auto size = size_after_crop ();
-       size.width *= _sample_aspect_ratio.get_value_or(1);
+       size.width = std::lrint(size.width * _sample_aspect_ratio.get_value_or(1));
 
        /* This is what we will return unless there is any legacy stuff to take into account */
        auto auto_size = fit_ratio_within (size.ratio(), film_container);