sndio: fix crash when volume is adjusted while stopped

Set volume/mute function pointers when handle is freed, to ensure
sio_setvol() is not called on a freed handle. Fixes crashes when volume
is adjusted while playback is stopped.

Fixes #25796
This commit is contained in:
Brad Smith 2021-06-03 09:50:52 +02:00 committed by Thomas Guillem
parent 65364b8338
commit e94b04c8f8
1 changed files with 2 additions and 0 deletions

View File

@ -208,6 +208,8 @@ static void Stop (audio_output_t *aout)
{
aout_sys_t *sys = aout->sys;
aout->volume_set = NULL;
aout->mute_set = NULL;
sio_close (sys->hdl);
}