[FFmpeg-devel] [PATCH] check sampling index validity when parsing adts frame header

Robert Swain robert.swain
Mon Feb 9 11:04:12 CET 2009


2009/2/9 Jai Menon <jmenon86 at gmail.com>:
> Hi,
>
> On Mon, Feb 9, 2009 at 1:51 PM, Baptiste Coudurier
> <baptiste.coudurier at gmail.com> wrote:
>> Hi Jai,
>>
>> Jai Menon wrote:
>>> Hi,
>>>
>>> On Mon, Feb 9, 2009 at 12:41 PM, Alex Converse <alex.converse at gmail.com> wrote:
>>>>> Index: libavcodec/aac.c
>>>>> ===================================================================
>>>>> --- libavcodec/aac.c  (revision 16998)
>>>>> +++ libavcodec/aac.c  (working copy)
>>>>> @@ -1529,6 +1529,11 @@
>>>>>          if (hdr_info.chan_config)
>>>>>              ac->m4ac.chan_config = hdr_info.chan_config;
>>>>>          ac->m4ac.sample_rate     = hdr_info.sample_rate;
>>>>> +
>>>>> +        if(hdr_info.sampling_index > 11) {
>>>> 12 is a valid sampling index. It corresponds to 7350 Hz.
>>>
>>> Shouldn't it be in the table then?
>>>
>>
>> Isn't it ? check mpeg4audio.c
>
> the table I referred to is swb_offset_1024 in aacdectab.h

I'll have to check the spec for this. There are other tables which are
indexed by sampling_index ( swb_offset, ff_aac_num_swb, tns_max_bands,
ff_aac_pred_sfb_max as well as ff_mpeg4audio_sample_rates ). If these
other tables only support up to index 11 in the spec then that's what
we shall have to check. If they should be extended and for whatever
reason they were truncated, we'll extend them.

Regards,
Rob




More information about the ffmpeg-devel mailing list