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.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lib/subtitle_decoder.h') diff --git a/src/lib/subtitle_decoder.h b/src/lib/subtitle_decoder.h index dfa3d6d90..e5e931669 100644 --- a/src/lib/subtitle_decoder.h +++ b/src/lib/subtitle_decoder.h @@ -63,6 +63,14 @@ public: return _content; } + boost::optional position () const { + return _position; + } + + void reset_position () { + _position.reset (); + } + private: std::list _decoded_image; @@ -74,6 +82,8 @@ private: boost::function (ContentTimePeriod, bool)> _image_during; boost::function (ContentTimePeriod, bool)> _text_during; + + boost::optional _position; }; #endif -- cgit v1.2.3