[Scummvm-cvs-logs] SF.net SVN: scummvm:[44556] scummvm/trunk/sound/vorbis.cpp
dhewg at users.sourceforge.net
dhewg at users.sourceforge.net
Sat Oct 3 21:27:10 CEST 2009
Revision: 44556
http://scummvm.svn.sourceforge.net/scummvm/?rev=44556&view=rev
Author: dhewg
Date: 2009-10-03 19:27:10 +0000 (Sat, 03 Oct 2009)
Log Message:
-----------
If an error occured on constructing a VorbisInputStream, return 0 from makeVorbisStream, just like makeFlacStream does.
Modified Paths:
--------------
scummvm/trunk/sound/vorbis.cpp
Modified: scummvm/trunk/sound/vorbis.cpp
===================================================================
--- scummvm/trunk/sound/vorbis.cpp 2009-10-03 13:47:17 UTC (rev 44555)
+++ scummvm/trunk/sound/vorbis.cpp 2009-10-03 19:27:10 UTC (rev 44556)
@@ -319,7 +319,14 @@
uint32 endTime = duration ? (startTime + duration) : 0;
- return new VorbisInputStream(stream, disposeAfterUse, startTime, endTime, numLoops);
+ VorbisInputStream *input = new VorbisInputStream(stream, disposeAfterUse, startTime, endTime, numLoops);
+
+ if (input->endOfData()) {
+ delete input;
+ return 0;
+ }
+
+ return input;
}
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