From d94bfc66ad903b3c2cd677e1d481bca69f70eb12 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 26 May 2008 05:17:21 +0000 Subject: Ooops, made frame skipping for A/V sync correction work again (instead of locking up) svn-id: r32276 --- engines/gob/coktelvideo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/gob') diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp index be639fae9f..415790e67b 100644 --- a/engines/gob/coktelvideo.cpp +++ b/engines/gob/coktelvideo.cpp @@ -326,11 +326,11 @@ void Imd::waitEndFrame() { return; if (_skipFrames == 0) { - int32 waitTime = ((_curFrame * _soundSliceLength) - - ((g_system->getMillis() - _soundStartTime) << 16)) >> 16; + int32 waitTime = (int16) (((_curFrame * _soundSliceLength) - + ((g_system->getMillis() - _soundStartTime) << 16)) >> 16); if (waitTime < 0) { - _skipFrames = -waitTime / _soundSliceLength; + _skipFrames = -waitTime / (_soundSliceLength >> 16); warning("Video A/V sync broken, skipping %d frame(s)", _skipFrames + 1); } else if (waitTime > 0) g_system->delayMillis(waitTime); -- cgit v1.2.3