From e881184597fa77bcc4ebf1e64a48927bc210d03d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 15 May 2018 22:37:26 +0100 Subject: Fix failure to skip through more than one empty reel when looking for a reel to put subtitles in. --- src/lib/writer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/writer.cc b/src/lib/writer.cc index d86a2ccf4..896d59cfc 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -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()); -- cgit v1.2.3