Try rounding length_after_trim.
[dcpomatic.git] / src / lib / content.cc
index 9280d2e612be094566c183ea6a0340b3179e1f5f..2593c01df2ca7a569cf48f101d55883840dd0bed 100644 (file)
@@ -52,6 +52,7 @@ using boost::shared_ptr;
 using boost::optional;
 using dcp::raw_convert;
 using dcp::locale_convert;
+using namespace dcpomatic;
 
 int const ContentProperty::PATH = 400;
 int const ContentProperty::POSITION = 401;
@@ -302,7 +303,7 @@ Content::technical_summary () const
 DCPTime
 Content::length_after_trim (shared_ptr<const Film> film) const
 {
-       return max (DCPTime(), full_length(film) - DCPTime(trim_start() + trim_end(), film->active_frame_rate_change(position())));
+       return max(DCPTime(), full_length(film) - DCPTime(trim_start() + trim_end(), film->active_frame_rate_change(position()))).round(film->video_frame_rate());
 }
 
 /** @return string which changes when something about this content changes which affects