Avoid deadlock in MPEG-2 cutscenes + slow devices

svn-id: r12996
This commit is contained in:
Nicolas Bacca 2004-02-22 18:13:54 +00:00
parent e40e3dd530
commit e469cd43a7
2 changed files with 8 additions and 0 deletions

View File

@ -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)) {

View File

@ -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)) {