]> git.sesse.net Git - vlc/blobdiff - modules/gui/minimal_macosx/intf.m
Qt4: do not allow spaces in network URLs (fix #3870)
[vlc] / modules / gui / minimal_macosx / intf.m
index d42ecbdb2296802c485fc20a397a93e6a95ca20f..aa88eab9804ef81f146163fe8d68b70ecca56d9f 100644 (file)
@@ -7,7 +7,7 @@
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
  *          Derk-Jan Hartman <hartman at videolan.org>
- *          Felix K\9fhne <fkuehne at videolan dot org>
+ *          Felix KΓΌhne <fkuehne at videolan dot org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -39,6 +39,7 @@
 #include <vlc_keys.h>
 
 #include <vlc_input.h>
+#import <vlc_interface.h>
 
 #import <intf.h>
 
@@ -57,7 +58,7 @@ int OpenIntf ( vlc_object_t *p_this )
     p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
     if( p_intf->p_sys == NULL )
     {
-        return( 1 );
+        return VLC_ENOMEM;
     }
 
     memset( p_intf->p_sys, 0, sizeof( *p_intf->p_sys ) );
@@ -98,12 +99,18 @@ static void * KillerThread( void *user_data )
 
     intf_thread_t *p_intf = user_data;
 
-    vlc_object_lock ( p_intf );
+    vlc_mutex_init( &p_intf->p_sys->lock );
+    vlc_cond_init( &p_intf->p_sys->wait );
+
+    vlc_mutex_lock ( &p_intf->p_sys->lock );
     while( vlc_object_alive( p_intf ) )
-        vlc_object_wait( p_intf );
-    vlc_object_unlock( p_intf );
+        vlc_cond_wait( &p_intf->p_sys->wait, &p_intf->p_sys->lock );
+    vlc_mutex_unlock( &p_intf->p_sys->lock );
+
+    vlc_mutex_destroy( &p_intf->p_sys->lock );
+    vlc_cond_destroy( &p_intf->p_sys->wait );
 
-    msg_Dbg( p_intf, "Killing the Mac OS X module" );
+    msg_Dbg( p_intf, "Killing the Minimal Mac OS X module" );
 
     /* We are dead, terminate */
     [NSApp terminate: nil];