[FFmpeg-cvslog] r21170 - trunk/libavcodec/alsdec.c

Måns Rullgård mans
Tue Jan 12 22:03:02 CET 2010


Thilo Borgmann <thilo.borgmann at googlemail.com> writes:

> Am 12.01.10 21:44, schrieb M?ns Rullg?rd:
>> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
>> 
>>> On Tue, Jan 12, 2010 at 08:37:25PM +0000, M?ns Rullg?rd wrote:
>>>> thilo.borgmann <subversion at mplayerhq.hu> writes:
>>>>
>>>>> Author: thilo.borgmann
>>>>> Date: Tue Jan 12 21:35:22 2010
>>>>> New Revision: 21170
>>>>>
>>>>> Log:
>>>>> Replace variable length array with an allocated buffer
>>>>> in the context to increase compatibility.
>>>>
>>>> What is the maximum size of that anyway?
>>>
>>> According to the documentation just below 4kB.
>> 
>> I missed that.
>> 
>>> While it shouldn't be put on the stack, I'd suggest just adding
>>> it into the context with the maximum size instead of allocating.
>> 
>> What's a typical size?  If it is usually much smaller,
>
> Yes.

Leave it as is then.

>> ... 4k is enough
>> that not always allocating it makes sense.
>
> So put an array[1024] into the context?

No, that would serve no purpose.

> Would this not end up on the stack?

Only if you allocate the context on the stack, which I hope you're not
doing.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-cvslog mailing list