]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/vout.m
Input access locking, part 3 (final).
[vlc] / modules / gui / macosx / vout.m
index 78e04a5daabafcb91b840f3bcab22b257d726d63..3d7330e4d221f320b871b580793bdc3e1f3a67b8 100644 (file)
@@ -285,12 +285,14 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
         return;
     }
 
-    if( input_GetItem(p_input)->psz_name != NULL )
-        o_title = [NSMutableString stringWithUTF8String:
-            input_GetItem(p_input)->psz_name];
-    if( input_GetItem(p_input)->psz_uri != NULL )
-        o_mrl = [NSMutableString stringWithUTF8String:
-            input_GetItem(p_input)->psz_uri];
+    char *psz_name = input_item_GetName( input_GetItem( p_input ) );
+    char *psz_uri = input_item_GetURI( input_GetItem( p_input ) );
+    if( psz_name != NULL )
+        o_title = [NSMutableString stringWithUTF8String: psz_name];
+    if( psz_uri != NULL )
+        o_mrl = [NSMutableString stringWithUTF8String: psz_uri];
+    free( psz_name );
+    free( psz_uri );
     if( o_title == nil )
         o_title = o_mrl;