Various fixes to push audio vaguely in the right direction.
[dcpomatic.git] / src / lib / text_subtitle_decoder.cc
index b59808728607680c94a2b24549daa23baa3e318b..bdec17a8dba0a7ad386ba9f3b2e676ca881d7885 100644 (file)
@@ -42,27 +42,28 @@ TextSubtitleDecoder::TextSubtitleDecoder (shared_ptr<const TextSubtitleContent>
 }
 
 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