summaryrefslogtreecommitdiff
path: root/src/lib/subtitle_decoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-10-08 00:45:22 +0100
committerCarl Hetherington <cth@carlh.net>2016-10-08 00:45:22 +0100
commit37494990bbe81f41f581de8258dc7353b82d662d (patch)
tree01fd28caeff323c9ffed0bf9b04ecee358b316d0 /src/lib/subtitle_decoder.h
parentb0463c6c22d51f6297eea313b429348c3bec3971 (diff)
Fix overlapping burnt-in subtitles in some cases (#959).
Firstly, when finding subtitles that exist during a period, only return those which overlap more than half the period. This means that, in a fight over a frame, the longest-running subtitle in that frame will win. Secondly, make SubtitleDecoder::get pick the wanted subtitles from the cache simply by comparing their periods to those that were requested. I think this is nicer than what was there before (basically reevaulating 'what subtitle(s) for this period') and also makes the first part of this commit effective.
Diffstat (limited to 'src/lib/subtitle_decoder.h')
-rw-r--r--src/lib/subtitle_decoder.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/subtitle_decoder.h b/src/lib/subtitle_decoder.h
index 726e898b1..eba36315e 100644
--- a/src/lib/subtitle_decoder.h
+++ b/src/lib/subtitle_decoder.h
@@ -69,7 +69,7 @@ private:
boost::shared_ptr<const SubtitleContent> _content;
template <class T>
- std::list<T> get (std::list<T> const & subs, std::list<ContentTimePeriod> const & sp, ContentTimePeriod period, bool starting, bool accurate);
+ std::list<T> get (std::list<T> const & subs, std::list<ContentTimePeriod> const & sp, ContentTimePeriod period, bool accurate);
boost::function<std::list<ContentTimePeriod> (ContentTimePeriod, bool)> _image_during;
boost::function<std::list<ContentTimePeriod> (ContentTimePeriod, bool)> _text_during;