X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fstring_text_file_decoder.cc;h=4cf34a3a94c31ace9c56d4ba4547587cd2ceab58;hp=e67450b8b719efe38527d74f5b908de3c67a9290;hb=6ef1fc5f40567650ca9ef2b7644e4fdd97640ae6;hpb=254b3044d72de6b033d7c584f5abd2b9aa70aad5 diff --git a/src/lib/string_text_file_decoder.cc b/src/lib/string_text_file_decoder.cc index e67450b8b..4cf34a3a9 100644 --- a/src/lib/string_text_file_decoder.cc +++ b/src/lib/string_text_file_decoder.cc @@ -34,9 +34,11 @@ using std::max; using boost::shared_ptr; using boost::optional; using boost::dynamic_pointer_cast; +using namespace dcpomatic; -StringTextFileDecoder::StringTextFileDecoder (shared_ptr content) - : StringTextFile (content) +StringTextFileDecoder::StringTextFileDecoder (shared_ptr film, shared_ptr content) + : Decoder (film) + , StringTextFile (content) , _next (0) { ContentTime first; @@ -47,7 +49,7 @@ StringTextFileDecoder::StringTextFileDecoder (shared_ptr film, ContentTime time, bool accurate) +StringTextFileDecoder::seek (ContentTime time, bool accurate) { /* It's worth back-tracking a little here as decoding is cheap and it's nice if we don't miss too many subtitles when seeking. @@ -57,7 +59,7 @@ StringTextFileDecoder::seek (shared_ptr film, ContentTime time, bool time = ContentTime(); } - Decoder::seek (film, time, accurate); + Decoder::seek (time, accurate); _next = 0; while (_next < _subtitles.size() && ContentTime::from_seconds (_subtitles[_next].from.all_as_seconds ()) < time) { @@ -66,7 +68,7 @@ StringTextFileDecoder::seek (shared_ptr film, ContentTime time, bool } bool -StringTextFileDecoder::pass (shared_ptr) +StringTextFileDecoder::pass () { if (_next >= _subtitles.size ()) { return true;