From 095d6a8f0f34658d86f935cb0b737cb7bc791a13 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Tue, 14 Apr 2015 14:38:41 +0200 Subject: dvdplayer: compare to absolute sync error, fix sync issues for large negative errors --- xbmc/cores/dvdplayer/DVDPlayerAudio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp index 0d4834c554..a345a880ea 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp @@ -665,7 +665,7 @@ void CDVDPlayerAudio::HandleSyncError(double duration) // as long as we are in sync mode, don't calculate the average // error because drop/dupe changes the value - if (m_syncclock && error > threshold1) + if (m_syncclock && fabs(error) > threshold1) { m_errors.Flush(500); m_integral = 0.0; -- cgit v1.2.3