[vlc-devel] [3.0 backport] sndio: fix crash when volume is adjusted while stopped
Thomas Guillem
thomas at gllm.fr
Mon Jun 7 05:19:45 UTC 2021
From: Brad Smith <brad at comstyle.com>
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
(cherry picked from commit e94b04c8f867382ce6835254d29ee54fe855c686)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
---
modules/audio_output/sndio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/audio_output/sndio.c b/modules/audio_output/sndio.c
index 6ea78dd2fa..3dba2b81e5 100644
--- a/modules/audio_output/sndio.c
+++ b/modules/audio_output/sndio.c
@@ -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);
}
--
2.30.2
More information about the vlc-devel
mailing list