From 2e62b2c0de47fc8e5bcb5466b2876f9b23d2ae84 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 26 Oct 2015 09:37:29 +0000 Subject: Reinstate subtitle speed-up patch 526fd6de4c80a7ac9614a1cb0209efff7b171cd5 but only for preview. --- src/lib/subtitle_decoder.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/subtitle_decoder.cc') diff --git a/src/lib/subtitle_decoder.cc b/src/lib/subtitle_decoder.cc index a7da626b7..454243b52 100644 --- a/src/lib/subtitle_decoder.cc +++ b/src/lib/subtitle_decoder.cc @@ -56,7 +56,7 @@ SubtitleDecoder::text_subtitle (ContentTimePeriod period, list list -SubtitleDecoder::get (list const & subs, list const & sp, ContentTimePeriod period, bool starting) +SubtitleDecoder::get (list const & subs, list const & sp, ContentTimePeriod period, bool starting, bool accurate) { if (sp.empty ()) { /* Nothing in this period */ @@ -72,7 +72,7 @@ SubtitleDecoder::get (list const & subs, list const & sp, * (a) give us what we want, or * (b) hit the end of the decoder. */ - while (!pass () && (subs.empty() || (subs.back().period().to < sp.back().to))) {} + while (!pass(PASS_REASON_SUBTITLE, accurate) && (subs.empty() || (subs.back().period().to < sp.back().to))) {} /* Now look for what we wanted in the data we have collected */ /* XXX: inefficient */ @@ -105,15 +105,15 @@ SubtitleDecoder::get (list const & subs, list const & sp, } list -SubtitleDecoder::get_text_subtitles (ContentTimePeriod period, bool starting) +SubtitleDecoder::get_text_subtitles (ContentTimePeriod period, bool starting, bool accurate) { - return get (_decoded_text_subtitles, text_subtitles_during (period, starting), period, starting); + return get (_decoded_text_subtitles, text_subtitles_during (period, starting), period, starting, accurate); } list -SubtitleDecoder::get_image_subtitles (ContentTimePeriod period, bool starting) +SubtitleDecoder::get_image_subtitles (ContentTimePeriod period, bool starting, bool accurate) { - return get (_decoded_image_subtitles, image_subtitles_during (period, starting), period, starting); + return get (_decoded_image_subtitles, image_subtitles_during (period, starting), period, starting, accurate); } void -- cgit v1.2.3