[FFmpeg-devel] [PATCH] add a close function to bitstream filter
Benoit Fouet
benoit.fouet
Mon Sep 3 15:13:28 CEST 2007
M?ns Rullg?rd wrote:
> Benoit Fouet wrote:
>
>> Aurelien Jacobs wrote:
>>
>>> On Mon, 03 Sep 2007 14:16:06 +0200
>>> Benoit Fouet <benoit.fouet at purplelabs.com> wrote:
>>>
>>>> Index: libavcodec/remove_extradata_bsf.c
>>>> ===================================================================
>>>> --- libavcodec/remove_extradata_bsf.c (revision 10287)
>>>> +++ libavcodec/remove_extradata_bsf.c (working copy)
>>>> @@ -52,4 +52,5 @@
>>>> "remove_extra",
>>>> 0,
>>>> remove_extradata,
>>>> + NULL,
>>>> };
>>>>
>>>>
>>> All those NULLs added to the end of existing bsfs are useless.
>>>
>>>
>>>
>> why ?
>> is there any guarantee that the memory is set to zero for non static
>> variable ?
>>
>
> Yes. All data with static storage duration, i.e. not allocated on the
> stack, is implicitly initialised as if through an assignment with a
> constant 0. This is not necessarily all bits zero, although in practise
> it always is, and either way is what you want.
>
ok, thanks for the explanation...
and thanks Aurel for the review
updated patch attached
--
Ben
Purple Labs S.A.
www.purplelabs.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bsfclose.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070903/3292291a/attachment.txt>
More information about the ffmpeg-devel
mailing list