[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.73,1.73.2.1

Travis Howell kirben at users.sourceforge.net
Mon Jul 28 18:10:28 CEST 2003


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

Modified Files:
      Tag: branch-0-5-0
	mixer.cpp 
Log Message:

fix for bug #776169


Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.73
retrieving revision 1.73.2.1
diff -u -d -r1.73 -r1.73.2.1
--- mixer.cpp	23 Jul 2003 13:16:58 -0000	1.73
+++ mixer.cpp	29 Jul 2003 01:09:51 -0000	1.73.2.1
@@ -935,6 +935,7 @@
 		memset(_ptr, 0, _bufferSize);
 		_size = _file->read(_ptr, _bufferSize);
 		if (!_size) {
+			debug(1, "Failed to read MP3 data during channel initialisation !");
 			destroy();
 			return;
 		}
@@ -1001,6 +1002,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