]> git.sesse.net Git - vlc/commitdiff
auhal: Fix kAudioDevicePropertyDeviceIsAlive check (vlc_bool_t size has changed and...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 19 Mar 2008 12:45:18 +0000 (13:45 +0100)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 19 Mar 2008 12:45:18 +0000 (13:45 +0100)
modules/audio_output/auhal.c

index f8ab8ee9bc8fe6fbd4dca4638491b00fe68c2c84..b2479f612a61d49ba2c62b1cf8521c41d3d8011e 100644 (file)
@@ -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 )