[FFmpeg-devel] AAC decoder round 6

Robert Swain robert.swain
Sat Aug 9 23:02:36 CEST 2008


2008/8/9 madshi <dear at madshi.net>:
> Robert Swain schrieb:
>> $subj
>>
>> Regards,
>> Rob
>>
>
>  > ac->m4ac.sampling_index = get_bits(gb, 4);
>  > if(ac->m4ac.sampling_index > 12) {
>  >   av_log(ac->avccontext, AV_LOG_ERROR, "invalid sampling rate index
> %d\n", ac->m4ac.sampling_index);
>  >   return -1;
>  > }
>  > ac->m4ac.sample_rate =
> ff_mpeg4audio_sample_rates[ac->m4ac.sampling_index];
>
> The valid sampling rate indexes are from 0..11.
> So shouldn't it be "if(ac->m4ac.sampling_index > 11)"?

It seems it should be, yes. Sample rates down to 8kHz are supported as
far as I can tell and index 12 is 7350Hz.

Rob




More information about the ffmpeg-devel mailing list