aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--video/smk_decoder.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index 454bc6dde5..366c434b1b 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -494,10 +494,15 @@ void SmackerDecoder::close() {
if (!_fileStream)
return;
- if (_audioStarted && _audioStream) {
- _mixer->stopHandle(_audioHandle);
+ if (_audioStream) {
+ if (_audioStarted) {
+ // The mixer will delete the stream.
+ _mixer->stopHandle(_audioHandle);
+ _audioStarted = false;
+ } else {
+ delete _audioStream;
+ }
_audioStream = 0;
- _audioStarted = false;
}
delete _fileStream;