diff options
author | Nicolas Bacca | 2004-02-22 18:13:54 +0000 |
---|---|---|
committer | Nicolas Bacca | 2004-02-22 18:13:54 +0000 |
commit | e469cd43a741e2f6d94419f1b3e12039dcdfc7ce (patch) | |
tree | 89fcf8f1af7298cf65530b3c6cc365026a2bfd90 /sword2/driver/animation.cpp | |
parent | e40e3dd530cd03503ca64893752e227d362d992c (diff) | |
download | scummvm-rg350-e469cd43a741e2f6d94419f1b3e12039dcdfc7ce.tar.gz scummvm-rg350-e469cd43a741e2f6d94419f1b3e12039dcdfc7ce.tar.bz2 scummvm-rg350-e469cd43a741e2f6d94419f1b3e12039dcdfc7ce.zip |
Avoid deadlock in MPEG-2 cutscenes + slow devices
svn-id: r12996
Diffstat (limited to 'sword2/driver/animation.cpp')
-rw-r--r-- | sword2/driver/animation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sword2/driver/animation.cpp b/sword2/driver/animation.cpp index 31a008cab9..4b915c913c 100644 --- a/sword2/driver/animation.cpp +++ b/sword2/driver/animation.cpp @@ -352,6 +352,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) || ((_vm->_mixer->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum + 1)) { |