]> git.sesse.net Git - vlc/commitdiff
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 5098da93968a047f80ca4b7e83ece6b55cd342e1..adf8428ce7cc10540d985007440fe6755d0e0150 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 9392d0ddc2817e0101292a6934d430f56ba545c1..0d88b0f4d623badaf91ff86ad40eb6f53629d182 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);