[vlc-devel] commit: Fix media library reference counting ( Rafaël Carré )

git version control git at videolan.org
Tue Apr 1 22:14:13 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Tue Apr  1 22:13:46 2008 +0200| [0c7849a6a0e9adc04c539df6716329bd9996a56f]

Fix media library reference counting

Please TEST your changes before pushing
At least, READ the code instead of modifying it blindly

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

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

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index daf6d22..18ce3f6 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -398,6 +398,8 @@ 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++ )
@@ -482,6 +484,7 @@ void playlist_LastLoop( playlist_t *p_playlist )
                                           p_playlist->pp_sds[0]->p_sd->psz_module );
     }
 
+    vlc_gc_incref( p_playlist->p_ml_category->p_input );
     playlist_MLDump( p_playlist );
     /* We don't need the media library anymore */
     ML_Decref( p_playlist->p_ml_category );




More information about the vlc-devel mailing list