aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/video
diff options
context:
space:
mode:
authorMax Horn2010-01-19 00:56:29 +0000
committerMax Horn2010-01-19 00:56:29 +0000
commit557bb394de6619dd1f360b72333fd2ec7b3defab (patch)
treeb1166a12105d01c92edb528177d24aa5115232e5 /engines/mohawk/video
parent69be7476212916b166ac16db41253cd367fb0dcc (diff)
downloadscummvm-rg350-557bb394de6619dd1f360b72333fd2ec7b3defab.tar.gz
scummvm-rg350-557bb394de6619dd1f360b72333fd2ec7b3defab.tar.bz2
scummvm-rg350-557bb394de6619dd1f360b72333fd2ec7b3defab.zip
Get rid of Mixer::FLAG_AUTOFREE.
Also fix several recently introduced new/delete vs. malloc/free mismatches. svn-id: r47369
Diffstat (limited to 'engines/mohawk/video')
-rw-r--r--engines/mohawk/video/qt_player.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/mohawk/video/qt_player.cpp b/engines/mohawk/video/qt_player.cpp
index 50928a0aac..4ddb8d2ee8 100644
--- a/engines/mohawk/video/qt_player.cpp
+++ b/engines/mohawk/video/qt_player.cpp
@@ -1159,7 +1159,7 @@ Audio::AudioStream *QTPlayer::createAudioStream(Common::SeekableReadStream *stre
if (_streams[_audioStreamIndex]->codec_tag == MKID_BE('twos') || _streams[_audioStreamIndex]->codec_tag == MKID_BE('raw ')) {
// Fortunately, most of the audio used in Myst videos is raw...
- uint16 flags = Audio::Mixer::FLAG_AUTOFREE;
+ uint16 flags = 0;
if (_streams[_audioStreamIndex]->codec_tag == MKID_BE('raw '))
flags |= Audio::Mixer::FLAG_UNSIGNED;
if (_streams[_audioStreamIndex]->channels == 2)
@@ -1170,7 +1170,7 @@ Audio::AudioStream *QTPlayer::createAudioStream(Common::SeekableReadStream *stre
byte *data = (byte *)malloc(dataSize);
stream->read(data, dataSize);
delete stream;
- return Audio::makeRawMemoryStream(data, dataSize, _streams[_audioStreamIndex]->sample_rate, flags, 0, 0);
+ return Audio::makeRawMemoryStream(data, dataSize, DisposeAfterUse::YES, _streams[_audioStreamIndex]->sample_rate, flags, 0, 0);
} else if (_streams[_audioStreamIndex]->codec_tag == MKID_BE('ima4')) {
// Riven uses this codec (as do some Myst ME videos)
return Audio::makeADPCMStream(stream, true, stream->size(), Audio::kADPCMApple, _streams[_audioStreamIndex]->sample_rate, _streams[_audioStreamIndex]->channels, 34);