From a28ef704adf8c5bfa45b3d6285f741af64758ceb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 8 Dec 2016 11:23:58 +0000 Subject: Further fixes and tidying to 'better-seek'. This fixes the failure to keep track of the `position' of each stream of a multi-stream file. It also tidies things up a bit. --- src/lib/subtitle_decoder.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib/subtitle_decoder.cc') diff --git a/src/lib/subtitle_decoder.cc b/src/lib/subtitle_decoder.cc index 9ec030b38..c59406c36 100644 --- a/src/lib/subtitle_decoder.cc +++ b/src/lib/subtitle_decoder.cc @@ -63,6 +63,7 @@ void SubtitleDecoder::give_image (ContentTimePeriod period, shared_ptr image, dcpomatic::Rect rect) { _decoded_image.push_back (ContentImageSubtitle (period, image, rect)); + _position = period.from; } void @@ -79,6 +80,7 @@ SubtitleDecoder::give_text (ContentTimePeriod period, list } _decoded_text.push_back (ContentTextSubtitle (period, s)); + _position = period.from; } /** Get the subtitles that correspond to a given list of periods. @@ -168,6 +170,7 @@ SubtitleDecoder::seek (ContentTime t, bool) { _log->log (String::compose ("SD seek to %1", to_string(t)), LogEntry::TYPE_DEBUG_DECODE); reset (); + _position.reset (); } void -- cgit v1.2.3