From ce269bfe6219a32300f15daf3698dd71ec78cf66 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 24 Jan 2009 20:23:26 +0200 Subject: [PATCH] Use libvlc_InternalWait --- 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 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); -- 2.39.2