mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
VIDEO: Stop mixer handle before deleting audio stream in VMDDecoder::seek
Fix a crash when playing looping ambient sounds in Adi4
This commit is contained in:
@@ -1771,6 +1771,9 @@ bool VMDDecoder::seek(int32 frame, int whence, bool restart) {
|
|||||||
if (_hasSound && (frame == -1) &&
|
if (_hasSound && (frame == -1) &&
|
||||||
((_soundStage == kSoundNone) || (_soundStage == kSoundFinished))) {
|
((_soundStage == kSoundNone) || (_soundStage == kSoundFinished))) {
|
||||||
|
|
||||||
|
if (_soundStage == kSoundFinished)
|
||||||
|
_mixer->stopHandle(_audioHandle);
|
||||||
|
|
||||||
delete _audioStream;
|
delete _audioStream;
|
||||||
|
|
||||||
_soundStage = kSoundLoaded;
|
_soundStage = kSoundLoaded;
|
||||||
|
|||||||
Reference in New Issue
Block a user