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

Jai Menon jmenon86
Mon Feb 9 08:45:15 CET 2009


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?

>> +            av_log(ac->avccontext, AV_LOG_ERROR, "invalid sampling rate index %d\n", hdr_info.sampling_index);
>> +            return -1;
>> +        }
>>          ac->m4ac.sampling_index  = hdr_info.sampling_index;
>>          ac->m4ac.object_type     = hdr_info.object_type;
>>      }
>
> --Alex


-- 
Regards,

Jai




More information about the ffmpeg-devel mailing list