Merge pull request #473 from Montellese/onplaybackspeedchanged
authorSascha Montellese <sascha.montellese@gmail.com>
Thu, 13 Oct 2011 10:47:54 +0000 (03:47 -0700)
committerSascha Montellese <sascha.montellese@gmail.com>
Thu, 13 Oct 2011 10:47:54 +0000 (03:47 -0700)
[dvdplayer] only call IPlayerCallback::OnPlayBackSpeedChanged if the speed has actually changed

xbmc/cores/dvdplayer/DVDPlayer.cpp

index 47b1ec2..10d7afe 100644 (file)
@@ -2114,13 +2114,8 @@ void CDVDPlayer::HandleMessages()
           m_State.timestamp =  CDVDClock::GetAbsoluteClock();
         }
 
-        if (speed != DVD_PLAYSPEED_PAUSE)
-        {
-          if (m_playSpeed != DVD_PLAYSPEED_PAUSE)
-          {
-            m_callback.OnPlayBackSpeedChanged(speed / DVD_PLAYSPEED_NORMAL );
-          }
-        }
+        if (speed != DVD_PLAYSPEED_PAUSE && m_playSpeed != DVD_PLAYSPEED_PAUSE && speed != m_playSpeed)
+          m_callback.OnPlayBackSpeedChanged(speed / DVD_PLAYSPEED_NORMAL);
 
         // if playspeed is different then DVD_PLAYSPEED_NORMAL or DVD_PLAYSPEED_PAUSE
         // audioplayer, stops outputing audio to audiorendere, but still tries to