From c8ff422a42eac30517a7acde57ab84e55449f4e4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 26 Jun 2015 22:02:00 +0100 Subject: Fix missing subtitles in some cases. We were passing subtitles back from decoders to SubtitleDecoder using dcp::SubtitleStrings and relying on their storage of time to know when the subtitles were. These times are quantised (by the use of dcp::SubtitleString) and then compared with unquantised times (kept as ContentTime) in the main checking loop in SubtitleDecoder::get(). Fix this by storing periods as ContentTimePeriod as well as in the dcp::SubtitleStrings. --- src/lib/subrip_decoder.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib/subrip_decoder.h') diff --git a/src/lib/subrip_decoder.h b/src/lib/subrip_decoder.h index 38ccca0a3..db8374c5c 100644 --- a/src/lib/subrip_decoder.h +++ b/src/lib/subrip_decoder.h @@ -37,6 +37,7 @@ protected: private: std::list image_subtitles_during (ContentTimePeriod, bool starting) const; std::list text_subtitles_during (ContentTimePeriod, bool starting) const; + ContentTimePeriod content_time_period (sub::Subtitle s) const; size_t _next; }; -- cgit v1.2.3