Skip to content

Commit

Permalink
Increase ParseScript cache from 30 to 90 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberbeing authored and x-xy-y committed Nov 19, 2012
1 parent 95376bc commit 1218890
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/subtitles/RTS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit 1218890

Please sign in to comment.