Skip to content

Commit

Permalink
Merge pull request #7099 from FernetMenta/ffffix
Browse files Browse the repository at this point in the history
dvdplayer: fix calc for frame dropping when going ff
  • Loading branch information
FernetMenta committed May 9, 2015
2 parents ebd3172 + 3ebe3ed commit b1ee3fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
Expand Up @@ -1156,8 +1156,10 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
int bufferLevel;
g_renderManager.GetStats(sleepTime, renderPts, bufferLevel);

// estimate the time it will take for the next frame to get rendered
// drop the frame if it's late in regard to this estimation
double diff = pts_org - renderPts;
double mindiff = DVD_SEC_TO_TIME(1/m_fFrameRate * m_speed / DVD_PLAYSPEED_NORMAL) * (bufferLevel +1);
double mindiff = DVD_SEC_TO_TIME(1/m_fFrameRate) * (bufferLevel + 1);
if (diff < mindiff)
{
m_droppingStats.AddOutputDropGain(pts, 1/m_fFrameRate);
Expand Down

0 comments on commit b1ee3fb

Please sign in to comment.