[FFmpeg-devel] [PATCH 1/6] flacdec: change variable-length array to fixed length
Justin Ruggles
justin.ruggles
Wed Aug 19 04:11:43 CEST 2009
M?ns Rullg?rd wrote:
> Justin Ruggles <justin.ruggles at gmail.com> writes:
>
>> Mans Rullgard wrote:
>>
>>> pred_order can never exceed 64, so always allocating that amount is safe
>>> and not very wasteful.
>>> ---
>>> libavcodec/flacdec.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
>>> index 4ff7fae..643ed24 100644
>>> --- a/libavcodec/flacdec.c
>>> +++ b/libavcodec/flacdec.c
>>> @@ -358,7 +358,7 @@ static int decode_subframe_lpc(FLACContext *s, int channel, int pred_order)
>>> {
>>> int i, j;
>>> int coeff_prec, qlevel;
>>> - int coeffs[pred_order];
>>> + int coeffs[64];
>>> int32_t *decoded = s->decoded[channel];
>>>
>>> /* warm up samples */
>> That should be 32, not 64.
>
> You're right. I just saw the get_bits(6).
>
> OK with that change?
yes.
More information about the ffmpeg-devel
mailing list