summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-22 14:44:41 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-22 14:44:41 +0100
commitf24452ee5fe7af655a16d4e1a3bb1c87a54596cc (patch)
tree683cc530ae0807079a98913232fe1290c6b87689 /src/lib
parent7a65b08f1b09beacc0e0a8060641f677683d400c (diff)
Somewhat hackily fix rounding of reel lengths.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/film.cc2
-rw-r--r--src/lib/video_content.cc5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 4a26ded3d..3cf46220e 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -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:
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc
index a9b286315..1e8b9034a 100644
--- a/src/lib/video_content.cc
+++ b/src/lib/video_content.cc
@@ -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;
}