Commit bc35aea3 authored by Rafaël Carré's avatar Rafaël Carré Committed by Pierre d'Herbemont

Use vlc_object_release() to release the playlist

Signed-off-by: default avatarPierre d'Herbemont <pdherbemont@videolan.org>
parent 0e3e5da4
......@@ -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" );
......
......@@ -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 */
......
......@@ -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 * );
......
......@@ -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
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment