aboutsummaryrefslogtreecommitdiff
path: root/sound/decoders
diff options
context:
space:
mode:
authorMatthew Hoops2010-05-26 12:15:14 +0000
committerMatthew Hoops2010-05-26 12:15:14 +0000
commitf2dda51943c0a34315babb8241c1f12fe3f5d658 (patch)
tree959470470e97bbb97115c2de00bc666aabdaf41f /sound/decoders
parent14fae8db03e5a314ec19277ef497fbaae03d6177 (diff)
downloadscummvm-rg350-f2dda51943c0a34315babb8241c1f12fe3f5d658.tar.gz
scummvm-rg350-f2dda51943c0a34315babb8241c1f12fe3f5d658.tar.bz2
scummvm-rg350-f2dda51943c0a34315babb8241c1f12fe3f5d658.zip
Have makeADPCMStream use the entire stream if the size is 0 (as it says in the doxygen comment).
svn-id: r49236
Diffstat (limited to 'sound/decoders')
-rw-r--r--sound/decoders/adpcm.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/decoders/adpcm.cpp b/sound/decoders/adpcm.cpp
index 7a85bc24d5..c8a907d13e 100644
--- a/sound/decoders/adpcm.cpp
+++ b/sound/decoders/adpcm.cpp
@@ -724,6 +724,10 @@ int16 Ima_ADPCMStream::decodeIMA(byte code, int channel) {
}
RewindableAudioStream *makeADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign) {
+ // If size is 0, report the entire size of the stream
+ if (!size)
+ size = stream->size();
+
switch (type) {
case kADPCMOki:
return new Oki_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign);