[vlc-devel] commit: Use libvlc_InternalWait ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Jan 24 19:57:56 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jan 24 20:23:26 2009 +0200| [ce269bfe6219a32300f15daf3698dd71ec78cf66] | committer: Rémi Denis-Courmont 

Use libvlc_InternalWait

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ce269bfe6219a32300f15daf3698dd71ec78cf66
---

 src/control/core.c        |    5 +----
 src/interface/interface.c |    5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/control/core.c b/src/control/core.c
index 5098da9..adf8428 100644
--- a/src/control/core.c
+++ b/src/control/core.c
@@ -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 )
diff --git a/src/interface/interface.c b/src/interface/interface.c
index 9392d0d..0d88b0f 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -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);




More information about the vlc-devel mailing list