vlc/vlc-3.0 | branch: master | Brad Smith <[email protected]> | 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 <[email protected]>

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

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to