diff --git a/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c b/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c index 889d93586..13cfb34c3 100644 --- a/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c +++ b/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c @@ -288,6 +288,7 @@ NoSound_PlaybackTaskFunc (void *data) SDL_Delay (delay); } + HFree (stream); FinishTask (task); return 0; } diff --git a/sc2/src/sc2code/libs/sound/openal/sound_openal.c b/sc2/src/sc2code/libs/sound/openal/sound_openal.c index 7b94c1c8a..0d8f8021a 100644 --- a/sc2/src/sc2code/libs/sound/openal/sound_openal.c +++ b/sc2/src/sc2code/libs/sound/openal/sound_openal.c @@ -105,6 +105,8 @@ TFB_alInitSound (int driver, int flags) StreamDecoderTask = AssignTask (StreamDecoderTaskFunc, 1024, "audio stream decoder"); + (void) driver; // eat compiler warning + return 0; } @@ -113,7 +115,11 @@ TFB_alUninitSound (void) { int i; - ConcludeTask (StreamDecoderTask); + if (StreamDecoderTask) + { + ConcludeTask (StreamDecoderTask); + StreamDecoderTask = NULL; + } for (i = 0; i < NUM_SOUNDSOURCES; ++i) {