From 121889015390f666e38700a1e6fa2d034f1eb358 Mon Sep 17 00:00:00 2001 From: Cyberbeing Date: Sat, 17 Nov 2012 11:54:55 -0800 Subject: [PATCH] Increase ParseScript cache from 30 to 90 seconds --- src/subtitles/RTS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/subtitles/RTS.cpp b/src/subtitles/RTS.cpp index 588b710c3..a0d8f84bc 100644 --- a/src/subtitles/RTS.cpp +++ b/src/subtitles/RTS.cpp @@ -3265,7 +3265,7 @@ HRESULT CRenderedTextSubtitle::ParseScript(REFERENCE_TIME rt, double fps, CSubti //const STSSegment* stss = SearchSubs2(t, fps, &segment); if(!stss) return S_FALSE; - // clear any cached subs not in the range of +/-30secs measured from the segment's bounds + // clear any cached subs not in the range of +/-90secs measured from the segment's bounds { POSITION pos = m_subtitleCache.GetStartPosition(); while(pos) @@ -3274,7 +3274,7 @@ HRESULT CRenderedTextSubtitle::ParseScript(REFERENCE_TIME rt, double fps, CSubti CSubtitle* value; m_subtitleCache.GetNextAssoc(pos, key, value); STSEntry& stse = m_entries.GetAt(key); - if(stse.end <= (t-30000) || stse.start > (t+30000)) + if(stse.end <= (t-90000) || stse.start > (t+90000)) { delete value; m_subtitleCache.RemoveKey(key);