Permalink
Browse files

dvdplayer: avoid short screen flicker caused by unnecessary reconfigu…

…re of renderer
  • Loading branch information...
1 parent 09d598a commit eb9cf33f365e7c84f462f86dabae3185ee6f5106 @FernetMenta committed Oct 2, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -1033,7 +1033,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
|| m_output.height != pPicture->iHeight
|| m_output.dwidth != pPicture->iDisplayWidth
|| m_output.dheight != pPicture->iDisplayHeight
- || m_output.framerate != config_framerate
+ || (!m_bFpsInvalid && fmod(m_output.framerate, config_framerate) != 0.0 )
|| m_output.color_format != (unsigned int)pPicture->format
|| m_output.extended_format != pPicture->extended_format
|| ( m_output.color_matrix != pPicture->color_matrix && pPicture->color_matrix != 0 ) // don't reconfigure on unspecified
@@ -1184,7 +1184,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
m_output.height = pPicture->iHeight;
m_output.dwidth = pPicture->iDisplayWidth;
m_output.dheight = pPicture->iDisplayHeight;
- m_output.framerate = config_framerate;
+ m_output.framerate = config_framerate == 0.0 ? g_graphicsContext.GetFPS() : config_framerate;
m_output.color_format = pPicture->format;
m_output.extended_format = pPicture->extended_format;
m_output.color_matrix = pPicture->color_matrix;

0 comments on commit eb9cf33

Please sign in to comment.