]> git.sesse.net Git - vlc/blobdiff - src/interface/interface.c
Fixed a potential interaction dialog leak.
[vlc] / src / interface / interface.c
index 9392d0ddc2817e0101292a6934d430f56ba545c1..41cb47804d6180a8a5401d49b7bfa2407b78f40b 100644 (file)
@@ -43,6 +43,9 @@
 #include <vlc_vout.h>
 
 #include "vlc_interface.h"
+#if defined( __APPLE__ ) || defined( WIN32 )
+#include "../control/libvlc_internal.h"
+#endif
 #include "libvlc.h"
 
 /*****************************************************************************
@@ -229,6 +232,7 @@ static void* RunInterface( vlc_object_t *p_this )
 }
 
 #if defined( __APPLE__ ) || defined( WIN32 )
+#include "control/libvlc_internal.h" /* libvlc_InternalWait */
 /**
  * MonitorLibVLCDeath: Used when b_should_run_on_first_thread is set.
  *
@@ -240,10 +244,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);