aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Borges de Freitas <92enen@gmail.com>2024-02-12 10:53:57 +0000
committerGitHub <noreply@github.com>2024-02-12 10:53:57 +0000
commit026ee6967b820f2b46d93adc5c89df84fafbc360 (patch)
treed1ecac81f2fd8c6570966356b09ae08d7d6bc191
parent01b7f87dea70cf24df3b2929d79c6d3742314d32 (diff)
parente86db05c3b1b8471d1f17c70f0b0a46bef88233c (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.cpp6
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;
}