From: RĂ©mi Denis-Courmont Date: Sat, 24 Jan 2009 18:23:26 +0000 (+0200) Subject: Use libvlc_InternalWait X-Git-Tag: 1.0.0-pre1~1073 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ce269bfe6219a32300f15daf3698dd71ec78cf66;p=vlc Use libvlc_InternalWait --- diff --git a/src/control/core.c b/src/control/core.c index 5098da9396..adf8428ce7 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 9392d0ddc2..0d88b0f4d6 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);