diff options
author | Miguel Borges de Freitas <92enen@gmail.com> | 2024-02-12 10:53:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-12 10:53:57 +0000 |
commit | 026ee6967b820f2b46d93adc5c89df84fafbc360 (patch) | |
tree | d1ecac81f2fd8c6570966356b09ae08d7d6bc191 | |
parent | 01b7f87dea70cf24df3b2929d79c6d3742314d32 (diff) | |
parent | e86db05c3b1b8471d1f17c70f0b0a46bef88233c (diff) |
Merge pull request #24692 from enen92/tempo_seek
VideoPlayer: Fix error window for tempo/fractional play speeds
-rw-r--r-- | xbmc/cores/VideoPlayer/VideoPlayer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xbmc/cores/VideoPlayer/VideoPlayer.cpp b/xbmc/cores/VideoPlayer/VideoPlayer.cpp index ad1741751b..c93beaa6ac 100644 --- a/xbmc/cores/VideoPlayer/VideoPlayer.cpp +++ b/xbmc/cores/VideoPlayer/VideoPlayer.cpp @@ -2157,9 +2157,9 @@ void CVideoPlayer::HandlePlaySpeed() // the the bigger is the error we allow if (m_playSpeed > DVD_PLAYSPEED_NORMAL) { - int errorwin = m_playSpeed / DVD_PLAYSPEED_NORMAL; - if (errorwin > 8) - errorwin = 8; + double errorwin = static_cast<double>(m_playSpeed) / DVD_PLAYSPEED_NORMAL; + if (errorwin > 8.0) + errorwin = 8.0; error /= errorwin; } |