mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 03:24:50 +00:00
VIDEO: Fix a leak in the Smacker decoder.
If audio was not yet started when a video was closed, the audio stream would be leaked. svn-id: r55802
This commit is contained in:
parent
6f9ac84f77
commit
dda8266ec8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user