[vlc-devel] commit: Remove playlist items from the "items" array when they are deleted ( Rafaël Carré )

git version control git at videolan.org
Wed Apr 23 10:39:40 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Apr 23 10:25:46 2008 +0200| [122a7d863270ca265144610276b5198396a66708]

Remove playlist items from the "items" array when they are deleted

Note that the only aim of this array seems to be counting the non-node items

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=122a7d863270ca265144610276b5198396a66708
---

 src/playlist/item.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/playlist/item.c b/src/playlist/item.c
index 0abf61b..2452051 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -852,6 +852,10 @@ static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
     if( i != -1 )
         ARRAY_REMOVE( p_playlist->all_items, i );
 
+    ARRAY_BSEARCH( p_playlist->items,->i_id, int, i_id, i );
+    if( i != -1 )
+        ARRAY_REMOVE( p_playlist->items, i );
+
     /* Check if it is the current item */
     if( p_playlist->status.p_item == p_item )
     {




More information about the vlc-devel mailing list