]> git.sesse.net Git - vlc/blobdiff - src/libvlc.c
interaction: safely join the thread
[vlc] / src / libvlc.c
index 023aa6edbb7b07d32c24099bd850f3266eb89eab..73eed932703d63f3eb3d0d9c91de6b35af56debd 100644 (file)
@@ -899,8 +899,10 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     var_Create( p_libvlc, "volume-change", VLC_VAR_BOOL );
 
     /* Create a variable for showing the interface (moved from playlist). */
-    var_Create( p_playlist, "intf-show", VLC_VAR_BOOL );
-    var_SetBool( p_playlist, "intf-show", true );
+    var_Create( p_libvlc, "intf-show", VLC_VAR_BOOL );
+    var_SetBool( p_libvlc, "intf-show", true );
+
+    var_Create( p_libvlc, "intf-popupmenu", VLC_VAR_BOOL );
 
     /*
      * Get input filenames given as commandline arguments
@@ -962,7 +964,7 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
 
     /* Free interaction */
     msg_Dbg( p_libvlc, "removing interaction" );
-    vlc_object_release( priv->p_interaction );
+    interaction_Destroy( priv->p_interaction );
 
     /* Free video outputs */
     msg_Dbg( p_libvlc, "removing all video outputs" );
@@ -1023,9 +1025,8 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
  * termination, and destroys their structure.
  * It stops the thread systems: no instance can run after this has run
  * \param p_libvlc the instance to destroy
- * \param b_release whether we should do a release on the instance
  */
-int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
+int libvlc_InternalDestroy( libvlc_int_t *p_libvlc )
 {
     if( !p_libvlc )
         return VLC_EGENERIC;
@@ -1084,7 +1085,6 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
     vlc_cond_destroy (&priv->threads_wait);
     vlc_mutex_destroy (&priv->threads_lock);
 
-    if( b_release ) vlc_object_release( p_libvlc );
     vlc_object_release( p_libvlc );
     p_libvlc = NULL;