[vlc-devel] commit: auhal: Fix kAudioDevicePropertyDeviceIsAlive check ( vlc_bool_t size has changed and doesn' t match anymore the needed param size for kAudioDevicePropertyDeviceIsAlive ). (Pierre d'Herbemont )

git version control git at videolan.org
Wed Mar 19 13:45:05 CET 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Wed Mar 19 13:45:18 2008 +0100| [5df4f82a48567b78a3c2a9ac9cb679d50e5351dc]

auhal: Fix kAudioDevicePropertyDeviceIsAlive check (vlc_bool_t size has changed and doesn't match anymore the needed param size for kAudioDevicePropertyDeviceIsAlive).

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

 modules/audio_output/auhal.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index f8ab8ee..b2479f6 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -152,10 +152,13 @@ static int Open( vlc_object_t * p_this )
     OSStatus                err = noErr;
     UInt32                  i_param_size = 0;
     struct aout_sys_t       *p_sys = NULL;
-    vlc_bool_t              b_alive = VLC_FALSE;
     vlc_value_t             val;
     aout_instance_t         *p_aout = (aout_instance_t *)p_this;
 
+    /* Use int here, to match kAudioDevicePropertyDeviceIsAlive
+     * property size */
+    int                     b_alive = VLC_FALSE; 
+
     /* Allocate structure */
     p_aout->output.p_sys = malloc( sizeof( aout_sys_t ) );
     if( p_aout->output.p_sys == NULL )
@@ -217,8 +220,9 @@ static int Open( vlc_object_t * p_this )
 
     if( err != noErr )
     {
-        msg_Err( p_aout, "could not check whether device is alive: %4.4s", (char *)&err );
-        goto error;
+        /* Be tolerant, only give a warning here */
+        msg_Warn( p_aout, "could not check whether device [0x%x] is alive: %4.4s", p_sys->i_selected_dev, (char *)&err );
+        b_alive = VLC_FALSE;
     }
 
     if( b_alive == VLC_FALSE )




More information about the vlc-devel mailing list