[vlc-commits] mmdevice: fix crash if several channel volumes change (fixes #12086)
Rémi Denis-Courmont
git at videolan.org
Thu Sep 4 21:55:46 CEST 2014
vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep 4 22:54:13 2014 +0300| [ab5b0c5be9e995ba9aa05355f2d7d17cc42d4721] | committer: Rémi Denis-Courmont
mmdevice: fix crash if several channel volumes change (fixes #12086)
(cherry picked from commit c5f806f480c9eda637b741d29c11b1b00e2a6f06)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ab5b0c5be9e995ba9aa05355f2d7d17cc42d4721
---
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