[vlc-devel] commit: libvlc: Don't use input_ItemClean. Anyway when we leak an object there is no use to delete it in the end. The mistake has already been done. (Pierre d'Herbemont )
Pierre d'Herbemont
pdherbemont at free.fr
Mon Mar 31 19:58:38 CEST 2008
On Mar 31, 2008, at 6:26 AM, Rafaël Carré wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Le Mon, 31 Mar 2008 00:44:54 +0200 (CEST),
> git at videolan.org (git version control) a écrit :
>
>> vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org>
>> | Mon Mar 31 00:44:25 2008 +0200|
>> [459f98e9d2db903cc935d9e036615a413676eef8]
>>
>> libvlc: Don't use input_ItemClean. Anyway when we leak an object
>> there is no use to delete it in the end. The mistake has already been
>> done.
>>
>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=459f98e9d2db903cc935d9e036615a413676eef8
>> ---
>>
>> src/libvlc-common.c | 3 +--
>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/libvlc-common.c b/src/libvlc-common.c
>> index a0ba3cd..d4573c5 100644
>> --- a/src/libvlc-common.c
>> +++ b/src/libvlc-common.c
>> @@ -989,8 +989,7 @@ int libvlc_InternalCleanup( libvlc_int_t
>> *p_libvlc ) msg_Dbg( p_libvlc, "removing remaining input items" );
>> FOREACH_ARRAY( input_item_t *p_del, p_libvlc->input_items )
>> msg_Dbg( p_libvlc, "WARNING: %p input item has not been
>> deleted properly", p_del );
>> - input_ItemClean( p_del );
>> - free( p_del );
>> + /* Don't do anything, faulting code should be fixed */
>> FOREACH_END();
>> ARRAY_RESET( p_libvlc->input_items );
>
> input items are not objects.
they are not vlc objects but they are gc enabled objects.
> Where are those supposed to be deleted, if not at libvlc destruction ?
The leaking input items are generally from the playlist which does not
properly delete them. I was a bit lazy to investigate more. But the
input item used by the playlist are supposed to freed by the playlist,
those used by libvlc-control are supposed to be released by libvlc-
control, same apply for input and vlm.
> To force code to be fixed, abort() is generally a very good idea.
Agreed. I just wanted not to be blamed for yet an other crash ;)
> Another thing, there is msg_Warn to display warnings.
Same here :)
Pierre.
More information about the vlc-devel
mailing list