summaryrefslogtreecommitdiff
path: root/src/lib/dcp_subtitle_decoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-26 22:02:00 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-26 22:02:00 +0100
commitc8ff422a42eac30517a7acde57ab84e55449f4e4 (patch)
tree6715a334126cca5558fb6158f0e9082cdb0afb5b /src/lib/dcp_subtitle_decoder.h
parentaddd3f846ed924710d7a416eedcda87653b75968 (diff)
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.
Diffstat (limited to 'src/lib/dcp_subtitle_decoder.h')
-rw-r--r--src/lib/dcp_subtitle_decoder.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/dcp_subtitle_decoder.h b/src/lib/dcp_subtitle_decoder.h
index a27d6b2db..fb2213fa2 100644
--- a/src/lib/dcp_subtitle_decoder.h
+++ b/src/lib/dcp_subtitle_decoder.h
@@ -34,6 +34,7 @@ protected:
private:
std::list<ContentTimePeriod> image_subtitles_during (ContentTimePeriod, bool starting) const;
std::list<ContentTimePeriod> text_subtitles_during (ContentTimePeriod, bool starting) const;
+ ContentTimePeriod content_time_period (dcp::SubtitleString s) const;
std::list<dcp::SubtitleString> _subtitles;
std::list<dcp::SubtitleString>::const_iterator _next;