Cherry-pick e881184: fix incorrect subtitle positioning in a VF when there are more...
authorCarl Hetherington <cth@carlh.net>
Tue, 15 May 2018 21:37:26 +0000 (22:37 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 21 May 2018 20:32:05 +0000 (21:32 +0100)
ChangeLog
src/lib/writer.cc

index 66d010b6dcbdade6ad29a93387b5238d35bed307..2ac3da72e145de7eacb643b4ab0b0f8292a273e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,7 +4,8 @@
 
 2018-05-15  Carl Hetherington  <cth@carlh.net>
 
-       * Version 2.12.5 released.
+       * Fix incorrect subtitle positining in a VF when there are more than
+       two consecutive reels with no subtitles.
 
 2018-05-08  Carl Hetherington  <cth@carlh.net>
 
index deb93b6c184f4c60b2e8be122b299aeeac39d08c..5f25b23c50c5a2ad28f63fb48154f075c6ee76bb 100644 (file)
@@ -657,8 +657,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());
        }
 
        _subtitle_reel->write (subs);