[vlc-commits] sndio: fix crash when volume is adjusted while stopped

Brad Smith git at videolan.org
Mon Jun 7 09:08:51 UTC 2021


vlc/vlc-3.0 | branch: master | Brad Smith <brad at comstyle.com> | Thu Jun  3 09:50:52 2021 +0200| [999057966390c25a3203e9980028f4a07360eebe] | committer: Thomas Guillem

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

(cherry picked from commit e94b04c8f867382ce6835254d29ee54fe855c686)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=999057966390c25a3203e9980028f4a07360eebe
---

 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);
 }
 



More information about the vlc-commits mailing list