[vlc-commits] mmdevice: make --no-volume-save actually work

Rémi Denis-Courmont git at videolan.org
Sun Apr 15 18:44:38 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 15 19:43:57 2018 +0300| [2c55748ea76bb97d43f41b3959fc0d6ab48cb0d1] | committer: Rémi Denis-Courmont

mmdevice: make --no-volume-save actually work

(fixes #20291)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c55748ea76bb97d43f41b3959fc0d6ab48cb0d1
---

 modules/audio_output/mmdevice.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index c2f190f01f..aa48a3164c 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -1096,8 +1096,9 @@ static int aout_stream_Start(void *func, va_list ap)
     aout_stream_t *s = va_arg(ap, aout_stream_t *);
     audio_sample_format_t *fmt = va_arg(ap, audio_sample_format_t *);
     HRESULT *hr = va_arg(ap, HRESULT *);
+    LPCGUID sid = var_InheritBool(s, "volume-save") ? &GUID_VLC_AUD_OUT : NULL;
 
-    *hr = start(s, fmt, &GUID_VLC_AUD_OUT);
+    *hr = start(s, fmt, sid);
     if (*hr == AUDCLNT_E_DEVICE_INVALIDATED)
         return VLC_ETIMEOUT;
     return SUCCEEDED(*hr) ? VLC_SUCCESS : VLC_EGENERIC;



More information about the vlc-commits mailing list