aboutsummaryrefslogtreecommitdiff
path: root/scumm/smush
diff options
context:
space:
mode:
authorMax Horn2005-03-09 16:37:44 +0000
committerMax Horn2005-03-09 16:37:44 +0000
commit13b8f678fc0ee6ab14e3264c58e858061fe625fd (patch)
tree74cdf54dbcae2c0c8b5ec08edf48c7cb775506ba /scumm/smush
parentf5b493d7353ecc46b073de0dc822a4272d4e39e0 (diff)
downloadscummvm-rg350-13b8f678fc0ee6ab14e3264c58e858061fe625fd.tar.gz
scummvm-rg350-13b8f678fc0ee6ab14e3264c58e858061fe625fd.tar.bz2
scummvm-rg350-13b8f678fc0ee6ab14e3264c58e858061fe625fd.zip
Fix one potential race condition between SMUSH and INSANE
svn-id: r17051
Diffstat (limited to 'scumm/smush')
-rw-r--r--scumm/smush/smush_player.cpp5
-rw-r--r--scumm/smush/smush_player.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index 162b87ee95..236efd0d6a 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -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();
diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h
index 9eb3031af0..eeb99a2d4f 100644
--- a/scumm/smush/smush_player.h
+++ b/scumm/smush/smush_player.h
@@ -80,6 +80,8 @@ private:
bool _inTimer;
#endif
+ Common::Mutex _mutex;
+
public:
SmushPlayer(ScummEngine_v6 *scumm, int speed);
~SmushPlayer();