Commit 35506f4d authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

playlist: items_to_delete is now private.

parent d228fdd2
......@@ -160,8 +160,6 @@ struct playlist_t
playlist_item_array_t items; /**< Arrays of items */
playlist_item_array_t all_items; /**< Array of items and nodes */
playlist_item_array_t items_to_delete; /**< Array of items and nodes to
delete... At the very end. This sucks. */
playlist_item_array_t current; /**< Items currently being played */
int i_current_index; /**< Index in current array */
......
......@@ -87,7 +87,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
ARRAY_INIT( p_playlist->items );
ARRAY_INIT( p_playlist->all_items );
ARRAY_INIT( p_playlist->items_to_delete );
ARRAY_INIT( pl_priv(p_playlist)->items_to_delete );
ARRAY_INIT( p_playlist->current );
p_playlist->i_current_index = 0;
......@@ -554,12 +554,12 @@ void playlist_LastLoop( playlist_t *p_playlist )
free( p_del );
FOREACH_END();
ARRAY_RESET( p_playlist->all_items );
FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->items_to_delete )
FOREACH_ARRAY( playlist_item_t *p_del, pl_priv(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( pl_priv(p_playlist)->items_to_delete );
ARRAY_RESET( p_playlist->items );
ARRAY_RESET( p_playlist->current );
......
......@@ -220,7 +220,7 @@ int playlist_ItemRelease( playlist_item_t *p_item )
*
* Who wants to add proper memory management? */
uninstall_input_item_observer( p_item );
ARRAY_APPEND( p_item->p_playlist->items_to_delete, p_item);
ARRAY_APPEND( pl_priv(p_playlist)->items_to_delete, p_item);
return VLC_SUCCESS;
}
......
......@@ -67,6 +67,9 @@ typedef struct playlist_private_t
playlist_fetcher_t fetcher; /**< Meta and art fetcher data */
sout_instance_t *p_sout; /**< Kept sout instance */
playlist_item_array_t items_to_delete; /**< Array of items and nodes to
delete... At the very end. This sucks. */
struct playlist_services_discovery_support_t {
/* the playlist items for category and onelevel */
playlist_item_t* p_cat;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment