From 6bfea2fcd003b1999217e4de9f3483e17f04b049 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20Stenac?= Date: Thu, 3 Aug 2006 22:24:42 +0000 Subject: [PATCH] This dichotomy code apparently still is buggy. Todo: redo it --- src/input/item.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/input/item.c b/src/input/item.c index dfee71b241..4cd600eacb 100644 --- a/src/input/item.c +++ b/src/input/item.c @@ -76,11 +76,11 @@ static void vlc_input_item_Destroy ( gc_object_t *p_this ) playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_obj, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); - vlc_input_item_Clean( p_input ); if( p_playlist ) { +#if 0 i_bottom = 0; i_top = p_playlist->i_input_items - 1; i = i_top / 2; while( p_playlist->pp_input_items[i]->i_id != p_input->i_id && @@ -99,6 +99,16 @@ static void vlc_input_item_Destroy ( gc_object_t *p_this ) REMOVE_ELEM( p_playlist->pp_input_items, p_playlist->i_input_items, i ); } +#endif + for( i = 0 ; i< p_playlist->pp_input_items[i] ; i++ ) + { + if( p_playlist->pp_input_items[i]->i_id == p_input->i_id ) + { + REMOVE_ELEM( p_playlist->pp_input_items, + p_playlist->i_input_items, i ); + break; + } + } vlc_object_release( p_playlist ); } free( p_input ); -- 2.39.5