ARRAY_INIT( p_playlist->items );
ARRAY_INIT( p_playlist->all_items );
+ ARRAY_INIT( p_playlist->items_to_delete );
ARRAY_INIT( p_playlist->current );
p_playlist->i_current_index = 0;
p_playlist->status.p_item->i_flags & PLAYLIST_REMOVE_FLAG &&
p_playlist->status.p_item != p_item )
{
- PL_DEBUG( "%s was marked for deletion, deleting",
- PLI_NAME( p_playlist->status.p_item ) );
- playlist_ItemDelete( p_playlist->status.p_item );
+ /* It's unsafe given current design to delete a playlist item :(
+ playlist_ItemDelete( p_playlist->status.p_item ); */
}
p_playlist->status.p_item = p_item;
}
p_playlist->status.p_node->i_flags & PLAYLIST_REMOVE_FLAG &&
p_playlist->status.p_node != p_node )
{
- PL_DEBUG( "%s was marked for deletion, deleting",
- PLI_NAME( p_playlist->status.p_node ) );
- playlist_ItemDelete( p_playlist->status.p_node );
+ /* It's unsafe given current design to delete a playlist item :(
+ playlist_ItemDelete( p_playlist->status.p_node ); */
}
p_playlist->status.p_node = p_node;
}
free( p_del );
FOREACH_END();
ARRAY_RESET( p_playlist->all_items );
+ FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->items_to_delete )
+ free( p_del->pp_children );
+ vlc_gc_decref( p_del->p_input );
+ free( p_del );
+ FOREACH_END();
+ ARRAY_RESET( p_playlist->items_to_delete );
ARRAY_RESET( p_playlist->items );
ARRAY_RESET( p_playlist->current );