]> git.sesse.net Git - vlc/commitdiff
minimal-macosx: compilation fix. Needs testing within the framework.
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 15 Feb 2009 14:36:04 +0000 (15:36 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 15 Feb 2009 23:41:37 +0000 (00:41 +0100)
modules/gui/minimal_macosx/intf.h
modules/gui/minimal_macosx/intf.m

index 8b4ae0d4307c44d6f610d45f480a757b416ada78..93ab46c657e18763ef1b7bd92b471afe64dde5a1 100644 (file)
@@ -47,5 +47,8 @@
 struct intf_sys_t
 {
     int nothing_for_now;
+
+    vlc_mutex_t lock;
+    vlc_cond_t wait;
 };
 
index 526bc708baaafa48b13e8ccdfb48037752814c36..9ad3d08796d32e16932e8134276debd9bd4621c4 100644 (file)
@@ -39,6 +39,7 @@
 #include <vlc_keys.h>
 
 #include <vlc_input.h>
+#import <vlc_interface.h>
 
 #import <intf.h>
 
@@ -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];