[vlc-commits] auhal: remove audio devices callback not before module close
David Fuhrmann
git at videolan.org
Mon Apr 22 22:15:32 CEST 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Mon Apr 22 21:54:04 2013 +0200| [777ce9acf34477735e14dfcf8860622b16f04164] | committer: David Fuhrmann
auhal: remove audio devices callback not before module close
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=777ce9acf34477735e14dfcf8860622b16f04164
---
modules/audio_output/auhal.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index f90be9e..66ba77e 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -210,7 +210,14 @@ static void Close(vlc_object_t *obj)
OSStatus err = noErr;
- /* remove audio device callback */
+ /* remove audio devices callback */
+ AudioObjectPropertyAddress audioDevicesAddress = { kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
+ err = AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &audioDevicesAddress, HardwareListener, (void *)p_aout);
+ if (err != noErr)
+ msg_Err(p_aout, "AudioHardwareRemovePropertyListener failed: [%4.4s]", (char *)&err);
+
+
+ /* remove audio device alive callback */
AudioObjectPropertyAddress deviceAliveAddress = { kAudioDevicePropertyDeviceIsAlive, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
err = AudioObjectRemovePropertyListener(p_sys->i_selected_dev, &deviceAliveAddress, HardwareListener, (void *)p_aout);
if (err != noErr)
@@ -926,12 +933,6 @@ static void Stop(audio_output_t *p_aout)
}
}
- AudioObjectPropertyAddress audioDevicesAddress = { kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
- err = AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &audioDevicesAddress, HardwareListener, (void *)p_aout);
-
- if (err != noErr)
- msg_Err(p_aout, "AudioHardwareRemovePropertyListener failed: [%4.4s]", (char *)&err);
-
if (p_sys->i_hog_pid == getpid()) {
p_sys->i_hog_pid = -1;
i_param_size = sizeof(p_sys->i_hog_pid);
More information about the vlc-commits
mailing list