[Scummvm-cvs-logs] SF.net SVN: scummvm:[44558] scummvm/branches/branch-1-0-0/sound/vorbis.cpp
dhewg at users.sourceforge.net
dhewg at users.sourceforge.net
Sat Oct 3 21:33:54 CEST 2009
Revision: 44558
http://scummvm.svn.sourceforge.net/scummvm/?rev=44558&view=rev
Author: dhewg
Date: 2009-10-03 19:33:54 +0000 (Sat, 03 Oct 2009)
Log Message:
-----------
Backport of r44556: If an error occured on constructing a VorbisInputStream, return 0 from makeVorbisStream, just like makeFlacStream does.
Modified Paths:
--------------
scummvm/branches/branch-1-0-0/sound/vorbis.cpp
Modified: scummvm/branches/branch-1-0-0/sound/vorbis.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/sound/vorbis.cpp 2009-10-03 19:29:14 UTC (rev 44557)
+++ scummvm/branches/branch-1-0-0/sound/vorbis.cpp 2009-10-03 19:33:54 UTC (rev 44558)
@@ -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