aboutsummaryrefslogtreecommitdiff
path: root/graphics/video/qt_decoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/video/qt_decoder.cpp')
-rw-r--r--graphics/video/qt_decoder.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/graphics/video/qt_decoder.cpp b/graphics/video/qt_decoder.cpp
index 49d2b0aed9..470441dab8 100644
--- a/graphics/video/qt_decoder.cpp
+++ b/graphics/video/qt_decoder.cpp
@@ -191,8 +191,10 @@ Codec *QuickTimeDecoder::createCodec(uint32 codecTag, byte bitsPerPixel) {
}
void QuickTimeDecoder::startAudio() {
- if (_audStream) // No audio/audio not supported
+ if (_audStream) { // No audio/audio not supported
+ updateAudioBuffer();
g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audHandle, _audStream);
+ }
}
void QuickTimeDecoder::stopAudio() {
@@ -204,7 +206,7 @@ void QuickTimeDecoder::stopAudio() {
void QuickTimeDecoder::pauseVideoIntern(bool pause) {
if (_audStream)
- g_system->getMixer()->pauseHandle(_audHandle, pause);
+ g_system->getMixer()->pauseHandle(_audHandle, pause);
}
Surface *QuickTimeDecoder::decodeNextFrame() {
@@ -306,8 +308,8 @@ bool QuickTimeDecoder::loadFile(const Common::String &filename) {
return true;
}
-bool QuickTimeDecoder::load(Common::SeekableReadStream &stream) {
- _fd = &stream;
+bool QuickTimeDecoder::load(Common::SeekableReadStream *stream) {
+ _fd = stream;
_foundMOOV = _foundMDAT = false;
_numStreams = 0;
_partial = 0;
@@ -534,6 +536,8 @@ int QuickTimeDecoder::readCMOV(MOVatom atom) {
unsigned long dstLen = uncompressedSize;
if (!Common::uncompress(uncompressedData, &dstLen, compressedData, compressedSize)) {
warning ("Could not uncompress cmov chunk");
+ free(compressedData);
+ free(uncompressedData);
return -1;
}