From 84012cdd64f451891febd36154b7226ea21a899b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 21 Nov 2018 02:45:30 +0000 Subject: Put Film pointer into Decoder. --- src/lib/string_text_file_decoder.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/lib/string_text_file_decoder.cc') diff --git a/src/lib/string_text_file_decoder.cc b/src/lib/string_text_file_decoder.cc index e67450b8b..8c9880b0c 100644 --- a/src/lib/string_text_file_decoder.cc +++ b/src/lib/string_text_file_decoder.cc @@ -35,8 +35,9 @@ using boost::shared_ptr; using boost::optional; using boost::dynamic_pointer_cast; -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 +48,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 +58,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 +67,7 @@ StringTextFileDecoder::seek (shared_ptr film, ContentTime time, bool } bool -StringTextFileDecoder::pass (shared_ptr) +StringTextFileDecoder::pass () { if (_next >= _subtitles.size ()) { return true; -- cgit v1.2.3