]> git.sesse.net Git - vlc/commitdiff
Use vlc_object_release() to release the playlist
authorRafaël Carré <funman@videolan.org>
Wed, 14 May 2008 20:09:39 +0000 (22:09 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 14 May 2008 20:28:20 +0000 (22:28 +0200)
Signed-off-by: Pierre d'Herbemont <pdherbemont@videolan.org>
src/libvlc-common.c
src/playlist/engine.c
src/playlist/playlist_internal.h
src/playlist/thread.c

index 18991b67a5bb3ba6cccc364b80f89ea016aa6203..d5c44d44350484f1e94d40b00f087298fc27a182 100644 (file)
@@ -939,7 +939,7 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
 
     /* Free playlist */
     msg_Dbg( p_libvlc, "removing playlist" );
-    playlist_ThreadDestroy( priv->p_playlist );
+    vlc_object_release( priv->p_playlist );
 
     /* Free video outputs */
     msg_Dbg( p_libvlc, "removing all video outputs" );
index b601439e05a86bed11038761202d14f0bd429780..3f732044b0e08f8cde2b37b64202c87bd76b8e70 100644 (file)
@@ -166,39 +166,16 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
  * \param p_playlist the playlist object
  * \return nothing
  */
-void playlist_Destroy( playlist_t *p_playlist )
-{
-    /* XXX: should go in the playlist destructor */
-    var_Destroy( p_playlist, "intf-change" );
-    var_Destroy( p_playlist, "item-change" );
-    var_Destroy( p_playlist, "playlist-current" );
-    var_Destroy( p_playlist, "intf-popupmenu" );
-    var_Destroy( p_playlist, "intf-show" );
-    var_Destroy( p_playlist, "play-and-stop" );
-    var_Destroy( p_playlist, "play-and-exit" );
-    var_Destroy( p_playlist, "random" );
-    var_Destroy( p_playlist, "repeat" );
-    var_Destroy( p_playlist, "loop" );
-    var_Destroy( p_playlist, "activity" );
-
-    vlc_object_release( p_playlist );
-}
 
 static void playlist_Destructor( vlc_object_t * p_this )
 {
     playlist_t * p_playlist = (playlist_t *)p_this;
 
-    // Kill preparser
     if( p_playlist->p_preparse )
-    {
         vlc_object_release( p_playlist->p_preparse );
-    }
 
-    // Kill meta fetcher
     if( p_playlist->p_fetcher )
-    {
         vlc_object_release( p_playlist->p_fetcher );
-    }
 }
 
 /* Destroy remaining objects */
index 94ab3f687247ea1eb6521a9d95bc62fa170c98fe..5c50ba1acc433fe3a78c0373b2dbe29160f9f3eb 100644 (file)
@@ -62,11 +62,9 @@ struct playlist_fetcher_t
 /* Global thread */
 #define playlist_ThreadCreate(a) __playlist_ThreadCreate(VLC_OBJECT(a))
 void        __playlist_ThreadCreate   ( vlc_object_t * );
-int           playlist_ThreadDestroy  ( playlist_t * );
 
 /* Creation/Deletion */
 playlist_t *playlist_Create   ( vlc_object_t * );
-void        playlist_Destroy  ( playlist_t * );
 
 /* Engine */
 void playlist_MainLoop( playlist_t * );
index 5208ca81c9b134ddae775912f2ca757383ce1a84..50d19bcb5d3d06015558cad02bb465e89dd5cc07 100644 (file)
@@ -125,19 +125,6 @@ void __playlist_ThreadCreate( vlc_object_t *p_parent )
     return;
 }
 
-/**
- * Destroy the playlist global thread.
- *
- * Deinits all things controlled by the playlist global thread
- * \param p_playlist the playlist thread to destroy
- * \return VLC_SUCCESS or an error
- */
-int playlist_ThreadDestroy( playlist_t * p_playlist )
-{
-    playlist_Destroy( p_playlist );
-    return VLC_SUCCESS;
-}
-
 /**
  * Run the main control thread itself
  */