From d5ece4a49930f905b767855e4310bae74b7fdac8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 15 May 2018 22:37:26 +0100 Subject: [PATCH] Cherry-pick e881184: fix incorrect subtitle positioning in a VF when there are more than two consecutive reels without subtitles. --- ChangeLog | 3 ++- src/lib/writer.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 66d010b6d..2ac3da72e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,8 @@ 2018-05-15 Carl Hetherington - * 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 diff --git a/src/lib/writer.cc b/src/lib/writer.cc index deb93b6c1..5f25b23c5 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -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); -- 2.30.2