X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_decoder.cc;h=04b264192cd9d43c184449820b9c16213118ed28;hb=2517ec798da291dedc02dd7a7a432f7aa63133e4;hp=9db3254019675061cc0f8095abb9f89604b111f1;hpb=de2af791bdfdcd653752cba970e59efc7bf810c7;p=dcpomatic.git diff --git a/src/lib/dcp_subtitle_decoder.cc b/src/lib/dcp_subtitle_decoder.cc index 9db325401..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,7 +72,7 @@ DCPSubtitleDecoder::pass () } subtitle->emit_text (p, s); - subtitle->set_position (p.from); + return false; } ContentTimePeriod