+2015-07-20 Carl Hetherington <cth@carlh.net>
+
+ * Fix missing second lines of subtitles in
+ some cases (#641).
+
2015-07-19 Carl Hetherington <cth@carlh.net>
* Fix some missing set-to-defaults (#640).
return true;
}
+ /* Gather all subtitles with the same time period that are next
+ on the list. We must emit all subtitles for the same time
+ period with the same text_subtitle() call otherwise the
+ SubtitleDecoder will assume there is nothing else at the
+ time of emit the first.
+ */
+
list<dcp::SubtitleString> s;
- s.push_back (*_next);
- text_subtitle (content_time_period (*_next), s);
- ++_next;
+ ContentTimePeriod const p = content_time_period (*_next);
+
+ while (_next != _subtitles.end () && content_time_period (*_next) == p) {
+ s.push_back (*_next);
+ ++_next;
+ }
+
+ text_subtitle (p, s);
return false;
}
bool overlaps (ContentTimePeriod const & o) const;
bool contains (ContentTime const & o) const;
+
+ bool operator== (ContentTimePeriod const & o) const {
+ return from == o.from && to == o.to;
+ }
};
DCPTime min (DCPTime a, DCPTime b);