From eefc143f08e4b4dc26ebbd2136488f5c95e6cc2a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 31 Oct 2019 20:34:53 +0100 Subject: Fix incorrect reels when the first content is not at time 0. With REELTYPE_BY_VIDEO_CONTENT the first reel would not start at 0. Backport of b950f49fa893e71545eaf9c0abe8a453d42a4340 from master. --- src/lib/film.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/film.cc b/src/lib/film.cc index 167ffaf4e..d311c76cb 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1563,24 +1563,24 @@ Film::reels () const break; case REELTYPE_BY_VIDEO_CONTENT: { - optional last_split; + DCPTime last_split; shared_ptr last_video; BOOST_FOREACH (shared_ptr c, content ()) { if (c->video) { BOOST_FOREACH (DCPTime t, c->reel_split_points(shared_from_this())) { - if (last_split) { - p.push_back (DCPTimePeriod (last_split.get(), t)); + if (last_split != t) { + p.push_back (DCPTimePeriod(last_split, t)); + last_split = t; } - last_split = t; } last_video = c; } } DCPTime video_end = last_video ? last_video->end(shared_from_this()) : DCPTime(0); - if (last_split) { + if (last_split != video_end) { /* Definitely go from the last split to the end of the video content */ - p.push_back (DCPTimePeriod (last_split.get(), video_end)); + p.push_back (DCPTimePeriod(last_split, video_end)); } if (video_end < len) { -- cgit v1.2.3