Make Atmos content work more like other content. Now its MXFs
[dcpomatic.git] / src / lib / content.cc
index a722cd15dae37fde8c2a17554753243d5651aa65..4242477d483a06fbfb877d90e8fa74c4f0f5db3c 100644 (file)
@@ -303,7 +303,11 @@ 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())));
+       DCPTime length = max(DCPTime(), full_length(film) - DCPTime(trim_start() + trim_end(), film->active_frame_rate_change(position())));
+       if (video) {
+               length = length.round(film->video_frame_rate());
+       }
+       return length;
 }
 
 /** @return string which changes when something about this content changes which affects