[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.cpp,1.135,1.136 smush_player.h,1.35,1.36

Gregory Montoir cyx at users.sourceforge.net
Fri Oct 8 11:36:25 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6906/scumm/smush

Modified Files:
	smush_player.cpp smush_player.h 
Log Message:
fix bug #1042931. This version of comidemo doesn't have the videos. In this case, SmushPlayer::play() returns immediately without calling init(). Thus, if init() is not called, we shouldn't call release() at all.

Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- smush_player.cpp	1 Oct 2004 21:37:29 -0000	1.135
+++ smush_player.cpp	8 Oct 2004 18:30:14 -0000	1.136
@@ -241,6 +241,7 @@
 	_height = 0;
 	_IACTpos = 0;
 	_soundFrequency = 22050;
+	_initDone = false;
 	_speed = speed;
 	_insanity = false;
 	_middleAudio = false;
@@ -248,7 +249,8 @@
 }
 
 SmushPlayer::~SmushPlayer() {
-	release();
+	if (_initDone)
+		release();
 }
 
 void SmushPlayer::init() {
@@ -271,9 +273,12 @@
 	
 	_smixer = new SmushMixer(_vm->_mixer);
 	g_timer->installTimerProc(&timerCallback, _speed, this);
+
+	_initDone = true;
 }
 
 void SmushPlayer::release() {
+	
 	_vm->_timer->removeTimerProc(&timerCallback);
 
 	_vm->_smushVideoShouldFinish = true;

Index: smush_player.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- smush_player.h	29 Sep 2004 17:50:17 -0000	1.35
+++ smush_player.h	8 Oct 2004 18:30:14 -0000	1.36
@@ -65,6 +65,7 @@
 	bool _storeFrame;
 	int _soundFrequency;
 	bool _alreadyInit;
+	bool _initDone;
 	int _speed;
 	bool _outputSound;
 





More information about the Scummvm-git-logs mailing list