Somewhat hackily fix rounding of reel lengths.
authorCarl Hetherington <cth@carlh.net>
Thu, 22 Oct 2015 13:44:41 +0000 (14:44 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 22 Oct 2015 13:44:41 +0000 (14:44 +0100)
src/lib/film.cc
src/lib/video_content.cc

index 4a26ded3d748968c9ebd4029043a31c37077678e..3cf46220ecde40a0d7b259351edfddf29964636d 100644 (file)
@@ -1292,7 +1292,7 @@ list<DCPTimePeriod>
 Film::reels () const
 {
        list<DCPTimePeriod> p;
-       DCPTime const len = length ();
+       DCPTime const len = length().round_up (video_frame_rate ());
 
        switch (reel_type ()) {
        case REELTYPE_SINGLE:
index a9b28631504a98e2ec82058cf18dab65b62c7fc1..1e8b9034a6242463a60389458e810a23df334eb9 100644 (file)
@@ -584,6 +584,9 @@ list<DCPTime>
 VideoContent::reel_split_points () const
 {
        list<DCPTime> t;
-       t.push_back (position ());
+       shared_ptr<const Film> film = _film.lock ();
+       DCPOMATIC_ASSERT (film);
+       /* XXX: this is questionable; perhaps the position should be forced to be on a frame boundary */
+       t.push_back (position().round_up (film->video_frame_rate()));
        return t;
 }