Force video content to start on a frame boundary.
authorCarl Hetherington <cth@carlh.net>
Wed, 12 Jul 2017 14:17:14 +0000 (15:17 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 12 Jul 2017 14:17:14 +0000 (15:17 +0100)
src/lib/content.cc

index 21b04c6493aea2f3d2ee0410a788b39a8dc85d04..691d3a66a546dd85c934d5f505e7e7cc74658f4f 100644 (file)
@@ -190,6 +190,11 @@ Content::signal_changed (int p)
 void
 Content::set_position (DCPTime p)
 {
+       /* video content can modify its position */
+       if (video) {
+               video->modify_position (p);
+       }
+
        {
                boost::mutex::scoped_lock lm (_mutex);
                if (p == _position) {
@@ -333,8 +338,10 @@ list<DCPTime>
 Content::reel_split_points () const
 {
        list<DCPTime> t;
-       /* XXX: this is questionable; perhaps the position itself should be forced to be on a frame boundary */
-       t.push_back (position().ceil (film()->video_frame_rate()));
+       /* This is only called for video content and such content has its position forced
+          to start on a frame boundary.
+       */
+       t.push_back (position());
        return t;
 }