]> git.sesse.net Git - vlc/commitdiff
Fix media library reference counting
authorRafaël Carré <funman@videolan.org>
Tue, 1 Apr 2008 20:13:46 +0000 (22:13 +0200)
committerRafaël Carré <funman@videolan.org>
Tue, 1 Apr 2008 20:13:46 +0000 (22:13 +0200)
Please TEST your changes before pushing
At least, READ the code instead of modifying it blindly

src/playlist/engine.c

index daf6d22bd713bfc622e5f3e1c1e11b27434a94f3..18ce3f61b69f8a0a662041f485043e90a71c3b18 100644 (file)
@@ -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 );