X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_decoder.cc;h=04b264192cd9d43c184449820b9c16213118ed28;hb=58dce923b9d438a27ce1cd7e3125370f74d46e3a;hp=ea24bb1c50d0f62e1d93fdf1c84ddc5777dbdc08;hpb=22b13599407e45d85d1c83e0805aa14965b0ab19;p=dcpomatic.git diff --git a/src/lib/dcp_subtitle_decoder.cc b/src/lib/dcp_subtitle_decoder.cc index ea24bb1c5..04b264192 100644 --- a/src/lib/dcp_subtitle_decoder.cc +++ b/src/lib/dcp_subtitle_decoder.cc @@ -38,8 +38,10 @@ DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr con } void -DCPSubtitleDecoder::seek (ContentTime time, bool) +DCPSubtitleDecoder::seek (ContentTime time, bool accurate) { + Decoder::seek (time, accurate); + _next = _subtitles.begin (); list::const_iterator i = _subtitles.begin (); while (i != _subtitles.end() && ContentTime::from_seconds (_next->in().as_seconds()) < time) { @@ -47,11 +49,11 @@ DCPSubtitleDecoder::seek (ContentTime time, bool) } } -void +bool DCPSubtitleDecoder::pass () { if (_next == _subtitles.end ()) { - return; + return true; } /* Gather all subtitles with the same time period that are next @@ -70,6 +72,7 @@ DCPSubtitleDecoder::pass () } subtitle->emit_text (p, s); + return false; } ContentTimePeriod