playlist_MLDump( p_playlist );
PL_LOCK;
- /* Go through all items, and simply free everything without caring
- * about the tree structure. Do not decref, it will be done by doing
- * the same thing on the input items array */
FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items )
free( p_del->pp_children );
+ vlc_gc_decref( p_del->p_input );
free( p_del );
FOREACH_END();
ARRAY_RESET( p_playlist->all_items );
p_playlist->p_ml_onelevel->p_input =
p_playlist->p_ml_category->p_input = p_input;
+ vlc_gc_incref( p_input );
+
vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded,
input_item_subitem_added, p_playlist );
stats_TimerStart( p_playlist, "ML Dump", STATS_TIMER_ML_DUMP );
playlist_Export( p_playlist, psz_dirname, p_playlist->p_ml_category,
"export-xspf" );
- vlc_gc_decref( p_playlist->p_ml_category->p_input );
stats_TimerStop( p_playlist, STATS_TIMER_ML_DUMP );
return VLC_SUCCESS;