Fix one potential race condition between SMUSH and INSANE

svn-id: r17051
This commit is contained in:
Max Horn 2005-03-09 16:37:44 +00:00
parent f5b493d735
commit 13b8f678fc
2 changed files with 7 additions and 0 deletions

View File

@ -1024,6 +1024,8 @@ void SmushPlayer::setupAnim(const char *file) {
}
void SmushPlayer::parseNextFrame() {
Common::StackLock lock(_mutex);
if (_vm->_smushPaused)
return;
@ -1138,6 +1140,9 @@ void SmushPlayer::insanity(bool flag) {
}
void SmushPlayer::seekSan(const char *file, int32 pos, int32 contFrame) {
Common::StackLock lock(_mutex);
if(_smixer)
_smixer->stop();

View File

@ -80,6 +80,8 @@ private:
bool _inTimer;
#endif
Common::Mutex _mutex;
public:
SmushPlayer(ScummEngine_v6 *scumm, int speed);
~SmushPlayer();