[MPlayer-dev-eng] [PATCH] Fix a sndio crash when exiting in muted state
Brad Smith
brad at comstyle.com
Tue Mar 14 12:31:19 EET 2023
Patch from Theo Buehler <tb at openbsd.org>
CVSROOT: /cvs
Module name: ports
Changes by: tb at cvs.openbsd.org 2023/03/14 04:08:13
Modified files:
x11/mplayer : Makefile
x11/mplayer/patches: patch-libao2_ao_sndio_c
Log message:
mplayer: fix a crash when exiting in muted state
Muting mplayer with 'm', then hitting '<enter>' segfaults mplayer since it
tries to unmute itself after uninitializing the sndio backend. Clear the
havevol flag on uninit() to block subsequent AOCONTROL_{GET,SET}_VOLUME
operations.
Fix suggested by and ok ratchov
Index: libao2/ao_sndio.c
===================================================================
--- libao2/ao_sndio.c (revision 38412)
+++ libao2/ao_sndio.c (working copy)
@@ -159,6 +159,7 @@
pfds = NULL;
sio_close(hdl);
hdl = NULL;
+ havevol = 0;
return 0;
}
@@ -172,6 +173,7 @@
hdl = NULL;
free(pfds);
pfds = NULL;
+ havevol = 0;
}
/*
More information about the MPlayer-dev-eng
mailing list