-/**
- * 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 )
-{
- p_playlist->b_die = VLC_TRUE;
- playlist_Signal( p_playlist );
- if( p_playlist->p_preparse )
- {
- vlc_cond_signal( &p_playlist->p_preparse->object_wait );
- free( p_playlist->p_preparse->pp_waiting );
- }
- if( p_playlist->p_fetcher )
- {
- vlc_cond_signal( &p_playlist->p_fetcher->object_wait );
- free( p_playlist->p_fetcher->p_waiting );
- }
-
- DestroyInteraction( p_playlist );
- DestroyPlaylist( p_playlist );
-
- return VLC_SUCCESS;
-}
-