]> git.sesse.net Git - vlc/blobdiff - src/control/core.c
libvlc: Don't wait if p_libvlc is dying in libvlc_wait().
[vlc] / src / control / core.c
index 5d4bf63241d1bd9ac803abd0c5eb71017a4f6c02..d7b220c2235d22de9c0730573e0dc0751f66a1f1 100644 (file)
@@ -166,10 +166,10 @@ void libvlc_release( libvlc_instance_t *p_instance )
     }
 }
 
-void libvlc_run_interface( libvlc_instance_t *p_i, const char *name,
-                           libvlc_exception_t *p_e )
+void libvlc_add_intf( libvlc_instance_t *p_i, const char *name,
+                      libvlc_exception_t *p_e )
 {
-    if( libvlc_InternalAddIntf( p_i->p_libvlc_int, name, true, true, 0, NULL ) )
+    if( libvlc_InternalAddIntf( p_i->p_libvlc_int, name, false, true, 0, NULL ) )
         RAISEVOID( "Interface initialization failed" );
 }
 
@@ -177,7 +177,8 @@ 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_wait( p_libvlc ) );
+    if( vlc_object_alive( p_libvlc ) )
+        while( !vlc_object_wait( p_libvlc ) );
     vlc_object_unlock( p_libvlc );
 }