[vlc-devel] commit: playlist: Correctly decref where we use the object. (Pierre d' Herbemont )

git version control git at videolan.org
Tue Apr 1 21:45:49 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Tue Apr  1 21:44:33 2008 +0200| [800b605ec18ae513c70ab69484455cdeaf7fc3a8]

playlist: Correctly decref where we use the object.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=800b605ec18ae513c70ab69484455cdeaf7fc3a8
---

 src/playlist/engine.c   |    2 --
 src/playlist/loadsave.c |    1 +
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 0529d75..daf6d22 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -398,8 +398,6 @@ check_input:
 
 static void ML_Decref( playlist_item_t *p_node )
 {
-    vlc_gc_decref( p_node->p_input );
-
     int i;
     if( p_node->i_children > 0 )
         for( i = 0 ; i < p_node->i_children ; i++ )
diff --git a/src/playlist/loadsave.c b/src/playlist/loadsave.c
index 830a0d1..7e5b001 100644
--- a/src/playlist/loadsave.c
+++ b/src/playlist/loadsave.c
@@ -180,6 +180,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
     vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded,
                         input_item_subitem_added, p_playlist );
 
+    vlc_gc_decref( p_input );
     free( psz_uri );
     return VLC_SUCCESS;
 




More information about the vlc-devel mailing list