[Scummvm-cvs-logs] SF.net SVN: scummvm:[55322] scummvm/trunk/graphics/video/coktel_decoder.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Wed Jan 19 10:02:07 CET 2011


Revision: 55322
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55322&view=rev
Author:   drmccoy
Date:     2011-01-19 09:02:07 +0000 (Wed, 19 Jan 2011)

Log Message:
-----------
VIDEO: Don't segfault when no audiostream is present

Modified Paths:
--------------
    scummvm/trunk/graphics/video/coktel_decoder.cpp

Modified: scummvm/trunk/graphics/video/coktel_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.cpp	2011-01-19 09:01:38 UTC (rev 55321)
+++ scummvm/trunk/graphics/video/coktel_decoder.cpp	2011-01-19 09:02:07 UTC (rev 55322)
@@ -1400,7 +1400,7 @@
 }
 
 void IMDDecoder::nextSoundSlice(bool hasNextCmd) {
-	if (hasNextCmd || !_soundEnabled) {
+	if (hasNextCmd || !_soundEnabled || !_audioStream) {
 		// Skip sound
 
 		_stream->skip(_soundSliceSize);
@@ -1420,7 +1420,7 @@
 bool IMDDecoder::initialSoundSlice(bool hasNextCmd) {
 	int dataLength = _soundSliceSize * _soundSlicesCount;
 
-	if (hasNextCmd || !_soundEnabled) {
+	if (hasNextCmd || !_soundEnabled || !_audioStream) {
 		// Skip sound
 
 		_stream->skip(dataLength);
@@ -1440,7 +1440,7 @@
 }
 
 void IMDDecoder::emptySoundSlice(bool hasNextCmd) {
-	if (hasNextCmd || !_soundEnabled)
+	if (hasNextCmd || !_soundEnabled || !_audioStream)
 		return;
 
 	// Create an empty sound buffer and queue it


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list