[vlc-devel] commit: Use the correct cleaning function instead of using an incomplete duplication ( Rafaël Carré )
git version control
git at videolan.org
Tue May 6 13:23:31 CEST 2008
vlc | branch: 0.8.6-bugfix | Rafaël Carré <funman at videolan.org> | Tue May 6 12:01:35 2008 +0200| [9bac06ebaca34309088202070b23124c83117ba3]
Use the correct cleaning function instead of using an incomplete duplication
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9bac06ebaca34309088202070b23124c83117ba3
---
src/playlist/item.c | 45 +--------------------------------------------
1 files changed, 1 insertions(+), 44 deletions(-)
diff --git a/src/playlist/item.c b/src/playlist/item.c
index f58cac6..9dfb882 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -189,47 +189,6 @@ playlist_item_t *__playlist_ItemCopy( vlc_object_t *p_obj,
*/
int playlist_ItemDelete( playlist_item_t *p_item )
{
- vlc_mutex_lock( &p_item->input.lock );
-
- if( p_item->input.psz_name ) free( p_item->input.psz_name );
- if( p_item->input.psz_uri ) free( p_item->input.psz_uri );
-
- /* Free the info categories */
- if( p_item->input.i_categories > 0 )
- {
- int i, j;
-
- for( i = 0; i < p_item->input.i_categories; i++ )
- {
- info_category_t *p_category = p_item->input.pp_categories[i];
-
- for( j = 0; j < p_category->i_infos; j++)
- {
- if( p_category->pp_infos[j]->psz_name )
- {
- free( p_category->pp_infos[j]->psz_name);
- }
- if( p_category->pp_infos[j]->psz_value )
- {
- free( p_category->pp_infos[j]->psz_value );
- }
- free( p_category->pp_infos[j] );
- }
-
- if( p_category->i_infos ) free( p_category->pp_infos );
- if( p_category->psz_name ) free( p_category->psz_name );
- free( p_category );
- }
-
- free( p_item->input.pp_categories );
- }
-
- for( ; p_item->input.i_options > 0; p_item->input.i_options-- )
- {
- free( p_item->input.ppsz_options[p_item->input.i_options - 1] );
- if( p_item->input.i_options == 1 ) free( p_item->input.ppsz_options );
- }
-
for( ; p_item->i_parents > 0 ; )
{
struct item_parent_t *p_parent = p_item->pp_parents[0];
@@ -237,9 +196,7 @@ int playlist_ItemDelete( playlist_item_t *p_item )
free( p_parent );
}
- vlc_mutex_unlock( &p_item->input.lock );
- vlc_mutex_destroy( &p_item->input.lock );
-
+ vlc_input_item_Clean( &p_item->input );
free( p_item );
return VLC_SUCCESS;
More information about the vlc-devel
mailing list