Skip to content

Commit

Permalink
[omxplayer] Limit subtitle updates to 10fps to avoid stuttering with …
Browse files Browse the repository at this point in the history
…closed captions
  • Loading branch information
popcornmix committed Feb 24, 2015
1 parent 5a3f0f3 commit 0c5e93e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbmc/cores/omxplayer/OMXPlayerVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ double OMXPlayerVideo::NextOverlay(double pts)
else if (delta_stop > 0.0 && (min_delta == DVD_NOPTS_VALUE || delta_stop < min_delta))
min_delta = delta_stop;
}
return min_delta == DVD_NOPTS_VALUE ? pts+DVD_MSEC_TO_TIME(500) : pts+min_delta;
return min_delta == DVD_NOPTS_VALUE ? pts+DVD_MSEC_TO_TIME(500) : pts+std::max(min_delta, DVD_MSEC_TO_TIME(100));
}


Expand Down Expand Up @@ -306,9 +306,9 @@ void OMXPlayerVideo::Output(double pts, bool bDropPacket)
double subtitle_pts = m_nextOverlay;
double time = subtitle_pts != DVD_NOPTS_VALUE ? subtitle_pts - media_pts : 0.0;

m_nextOverlay = NextOverlay(media_pts);
m_nextOverlay = NextOverlay(media_pts + preroll);

ProcessOverlays(media_pts);
ProcessOverlays(media_pts + preroll);

time += m_av_clock->GetAbsoluteClock();
g_renderManager.FlipPage(CThread::m_bStop, time/DVD_TIME_BASE);
Expand Down

0 comments on commit 0c5e93e

Please sign in to comment.