[vlc-devel] commit: playlist: items_to_delete is now private. (Pierre d'Herbemont )
git version control
git at videolan.org
Sat Sep 27 19:16:28 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Sep 27 19:18:20 2008 +0200| [35506f4d2f1f31e36eb8fe09f6cd1cb602065507] | committer: Pierre d'Herbemont
playlist: items_to_delete is now private.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=35506f4d2f1f31e36eb8fe09f6cd1cb602065507
---
include/vlc_playlist.h | 2 --
src/playlist/engine.c | 6 +++---
src/playlist/item.c | 2 +-
src/playlist/playlist_internal.h | 3 +++
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index ee17144..c170b22 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -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 */
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 8745d34..4eae3fa 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -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 );
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 99b285b..0e92216 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -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;
}
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 496b021..1bcd850 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -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;
More information about the vlc-devel
mailing list