diff options
author | Matthew Hoops | 2010-07-27 14:51:36 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-07-27 14:51:36 +0000 |
commit | 349d3765e3e65bec4c198fe833e0ebe6e8478323 (patch) | |
tree | 5a4c43f374bb1d60f4e00fa2dea59c043e1ddb1c /sound/decoders/aiff.cpp | |
parent | bc6baef0c0e6d952f5ac2eca2ccb1352cb9444b7 (diff) | |
download | scummvm-rg350-349d3765e3e65bec4c198fe833e0ebe6e8478323.tar.gz scummvm-rg350-349d3765e3e65bec4c198fe833e0ebe6e8478323.tar.bz2 scummvm-rg350-349d3765e3e65bec4c198fe833e0ebe6e8478323.zip |
SOUND: Only dispose the input stream in makeAIFFStream if requested
svn-id: r51373
Diffstat (limited to 'sound/decoders/aiff.cpp')
-rw-r--r-- | sound/decoders/aiff.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/decoders/aiff.cpp b/sound/decoders/aiff.cpp index b76410f8d1..ce8c6ad32c 100644 --- a/sound/decoders/aiff.cpp +++ b/sound/decoders/aiff.cpp @@ -175,7 +175,9 @@ SeekableAudioStream *makeAIFFStream(Common::SeekableReadStream *stream, data = (byte *)malloc(size); assert(data); stream->read(data, size); - delete stream; + + if (disposeAfterUse == DisposeAfterUse::YES) + delete stream; // Since we allocated our own buffer for the data, we must specify DisposeAfterUse::YES. return makeRawStream(data, size, rate, flags); |