Use libvlc_InternalWait
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 24 Jan 2009 18:23:26 +0000 (20:23 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 24 Jan 2009 18:57:51 +0000 (20:57 +0200)
src/control/core.c
src/interface/interface.c

index 5098da9..adf8428 100644 (file)
@@ -184,10 +184,7 @@ void libvlc_add_intf( libvlc_instance_t *p_i, const char *name,
 void libvlc_wait( libvlc_instance_t *p_i )
 {
     libvlc_int_t *p_libvlc = p_i->p_libvlc_int;
-    vlc_object_lock( p_libvlc );
-    while( vlc_object_alive( p_libvlc ) )
-        vlc_object_wait( p_libvlc );
-    vlc_object_unlock( p_libvlc );
+    libvlc_InternalWait( p_libvlc );
 }
 
 int libvlc_get_vlc_id( libvlc_instance_t *p_instance )
index 9392d0d..0d88b0f 100644 (file)
@@ -240,10 +240,7 @@ static void * MonitorLibVLCDeath( vlc_object_t * p_this )
     libvlc_int_t * p_libvlc = p_intf->p_libvlc;
     int canc = vlc_savecancel ();
 
-    vlc_object_lock( p_libvlc );
-    while( vlc_object_alive( p_libvlc ) )
-        vlc_object_wait( p_libvlc );
-    vlc_object_unlock( p_libvlc );
+    libvlc_InternalWait( p_libvlc );
 
     vlc_object_kill( p_intf ); /* Kill the stupid first thread interface */
     vlc_restorecancel (canc);