From e469cd43a741e2f6d94419f1b3e12039dcdfc7ce Mon Sep 17 00:00:00 2001 From: Nicolas Bacca Date: Sun, 22 Feb 2004 18:13:54 +0000 Subject: Avoid deadlock in MPEG-2 cutscenes + slow devices svn-id: r12996 --- sword1/animation.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sword1') diff --git a/sword1/animation.cpp b/sword1/animation.cpp index 960e8f8306..9212656762 100644 --- a/sword1/animation.cpp +++ b/sword1/animation.cpp @@ -307,6 +307,10 @@ bool AnimationState::decodeFrame() { * frames if we run behind and delaying if we are too fast */ + /* Avoid deadlock is sound was too far ahead */ + if (bgSoundStream && !bgSound.isActive()) + return false; + #ifdef BACKEND_8BIT if (checkPaletteSwitch() || (bgSoundStream == NULL) || ((_snd->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1)) { -- cgit v1.2.3