[vlc-commits] mmdevice: fix crash if several channel volumes change (fixes #12086)

Rémi Denis-Courmont git at videolan.org
Thu Sep 4 21:54:53 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep  4 22:54:13 2014 +0300| [c5f806f480c9eda637b741d29c11b1b00e2a6f06] | committer: Rémi Denis-Courmont

mmdevice: fix crash if several channel volumes change (fixes #12086)

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

 modules/audio_output/mmdevice.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 6735cec..d41bb02 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -306,8 +306,12 @@ vlc_AudioSessionEvents_OnChannelVolumeChanged(IAudioSessionEvents *this,
     aout_sys_t *sys = vlc_AudioSessionEvents_sys(this);
     audio_output_t *aout = sys->aout;
 
-    msg_Dbg(aout, "channel volume %lu of %lu changed: %f", changed, count,
-            vols[changed]);
+    if (changed != (DWORD)-1)
+        msg_Dbg(aout, "channel volume %lu of %lu changed: %f", changed, count,
+                vols[changed]);
+    else
+        msg_Dbg(aout, "%lu channels volume changed", count);
+
     (void) ctx;
     return S_OK;
 }



More information about the vlc-commits mailing list