[FFmpeg-devel] [PATCH 1/6] flacdec: change variable-length array to fixed length
Måns Rullgård
mans
Thu Aug 20 00:07:31 CEST 2009
Justin Ruggles <justin.ruggles at gmail.com> writes:
> 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.
Applied.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list