[FFmpeg-devel] [PATCH] amrnb: use correct when copying lsf_r array

Måns Rullgård mans
Sun Feb 20 18:13:41 CET 2011


Benoit Fouet <benoit.fouet at free.fr> writes:

> On 20/02/2011 18:01, Mans Rullgard wrote:
>> lsf_r is an array of int16_t, not float.
>>
>> Signed-off-by: Mans Rullgard<mans at mansr.com>
>> ---
>>   libavcodec/amrnbdec.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
>> index ec896c7..2883b9c 100644
>> --- a/libavcodec/amrnbdec.c
>> +++ b/libavcodec/amrnbdec.c
>> @@ -255,7 +255,7 @@ static void lsf2lsp_for_mode12k2(AMRContext *p, double lsp[LP_FILTER_ORDER],
>>       }
>>
>>       if (update)
>> -        memcpy(p->prev_lsf_r, lsf_r, LP_FILTER_ORDER * sizeof(float));
>> +        memcpy(p->prev_lsf_r, lsf_r, LP_FILTER_ORDER * sizeof(*lsf_r));
>>
>>       for (i = 0; i<  LP_FILTER_ORDER; i++)
>>           lsf_q[i] = lsf_r[i] * (LSF_R_FAC / 8000.0) + lsf_no_r[i] * (1.0 / 8000.0);
>
> Looks sane, just fix your commit message.

Right, there's a "size" missing there.  Thanks for spotting.

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



More information about the ffmpeg-devel mailing list