[vlc-devel] commit: Use vlc_object_release() to release the playlist ( Rafaël Carré )
git version control
git at videolan.org
Wed May 14 22:27:50 CEST 2008
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed May 14 22:09:39 2008 +0200| [bc35aea3a1f6c84524c56e8da7610a6edaadb0e3]
Use vlc_object_release() to release the playlist
Signed-off-by: Pierre d'Herbemont <pdherbemont at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc35aea3a1f6c84524c56e8da7610a6edaadb0e3
---
src/libvlc-common.c | 2 +-
src/playlist/engine.c | 23 -----------------------
src/playlist/playlist_internal.h | 2 --
src/playlist/thread.c | 13 -------------
4 files changed, 1 insertions(+), 39 deletions(-)
diff --git a/src/libvlc-common.c b/src/libvlc-common.c
index 18991b6..d5c44d4 100644
--- a/src/libvlc-common.c
+++ b/src/libvlc-common.c
@@ -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" );
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index b601439..3f73204 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -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 */
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 94ab3f6..5c50ba1 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -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 * );
diff --git a/src/playlist/thread.c b/src/playlist/thread.c
index 5208ca8..50d19bc 100644
--- a/src/playlist/thread.c
+++ b/src/playlist/thread.c
@@ -126,19 +126,6 @@ void __playlist_ThreadCreate( vlc_object_t *p_parent )
}
/**
- * 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
*/
static void RunControlThread ( playlist_t *p_playlist )
More information about the vlc-devel
mailing list