Fix failure to skip through more than one empty reel when looking for a reel to put...
authorCarl Hetherington <cth@carlh.net>
Tue, 15 May 2018 21:37:26 +0000 (22:37 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 15 May 2018 21:37:26 +0000 (22:37 +0100)
ChangeLog
src/lib/writer.cc

index dcb0ef1cb86c4d0310b67ebfe31a94cc9e08eeaa..98f6c7d9093184f2e7c6fcfdffbd0085e1442d94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2018-05-15  Carl Hetherington  <cth@carlh.net>
 
+       * Fix incorrect subtitle positining in a VF when there are more than
+       two consecutive reels with no subtitles.
+
        * Fix missing burnt-in / previewed subtitles containing ampersands.
 
 2018-05-08  Carl Hetherington  <cth@carlh.net>
index d86a2ccf4ab032ba3a6d1f17ca232af7482bd02f..896d59cfcb2d0856e5647887da828a3abd34b616 100644 (file)
@@ -660,8 +660,9 @@ Writer::write (PlayerSubtitles subs, DCPTimePeriod period)
                return;
        }
 
-       if (_subtitle_reel->period().to <= period.from) {
+       while (_subtitle_reel->period().to <= period.from) {
                ++_subtitle_reel;
+               DCPOMATIC_ASSERT (_subtitle_reel != _reels.end());
        }
 
        DCPOMATIC_ASSERT (_subtitle_reel != _reels.end());