[FFmpeg-devel] [PATCH] AAC Decoder - Round 2.
Robert Swain
robert.swain
Mon Jun 23 12:47:50 CEST 2008
2008/6/21 Michael Niedermayer <michaelni at gmx.at>:
> On Sat, Jun 21, 2008 at 04:28:23PM +0100, Robert Swain wrote:
>> 2008/6/20 Michael Niedermayer <michaelni at gmx.at>:
>> >> + int j;
>> >> + if (index == -1) {
>> >> + av_log(ac->avccontext, AV_LOG_ERROR, "Error in spectral data\n");
>> >> + return -1;
>> >> + }
>> >
>> > can that happen at all?
>>
>> Unless I misunderstand, it doesn't look like it as all the VLC tables
>> are unsigned. Remove?
>
> ehhh
> -1 can happen if you have a vlc table with codes like
> 01
> 110
> 111
> 10
>
> and you receive 00
>
> it cannot happen with
> 01
> 001
> 000
> 110
> 111
> 10
>
> to check this for random tables just add the 2^-len of all codes
> 4*2^-3 + 2*2^-2 = 1 here and the previous table is < 1
> If theres one <1 then -1 can happen and should be checked otherwise
> it is redundant.
I just checked the bits1 table and they summed to 0 so I guess the check stays.
Rob
More information about the ffmpeg-devel
mailing list