[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.75,1.76

Max Horn fingolfin at users.sourceforge.net
Mon Jul 28 13:26:05 CEST 2003


Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv22642

Modified Files:
	mixer.cpp 
Log Message:
fix for bug #776169

Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- mixer.cpp	26 Jul 2003 01:44:37 -0000	1.75
+++ mixer.cpp	28 Jul 2003 20:25:09 -0000	1.76
@@ -933,6 +933,7 @@
 		memset(_ptr, 0, _bufferSize);
 		_size = _file->read(_ptr, _bufferSize);
 		if (_size <= 0) {
+			debug(1, "Failed to read MP3 data during channel initialisation !");
 			destroy();
 			return;
 		}
@@ -1005,6 +1006,9 @@
 					not_decoded = _stream.bufend - _stream.next_frame;
 					memcpy(_ptr, _stream.next_frame, not_decoded);
 					_size = _file->read(_ptr + not_decoded, _bufferSize - not_decoded);
+				}
+				if (_size <= 0) {
+					return;
 				}
 				_stream.error = (enum mad_error)0;
 				// Restream





More information about the Scummvm-git-logs mailing list