}
void
-TextSubtitleDecoder::seek (ContentTime time, bool)
+TextSubtitleDecoder::seek (ContentTime time, bool accurate)
{
+ Decoder::seek (time, accurate);
+
_next = 0;
while (_next < _subtitles.size() && ContentTime::from_seconds (_subtitles[_next].from.all_as_seconds ()) < time) {
++_next;
}
}
-void
+bool
TextSubtitleDecoder::pass ()
{
if (_next >= _subtitles.size ()) {
- return;
+ return true;
}
ContentTimePeriod const p = content_time_period (_subtitles[_next]);
subtitle->emit_text (p, _subtitles[_next]);
- subtitle->set_position (p.from);
++_next;
- return;
+ return false;
}
ContentTimePeriod