[FFmpeg-devel] [PATCH] ALS decoder
Thilo Borgmann
thilo.borgmann
Sun Aug 23 13:40:24 CEST 2009
>>>> + // skip the header and trailer data
>>>> + if (buffer_size < ht_size)
>>>> + return -1;
>>>> +
>>>> + ht_size <<= 3;
>>>> +
>>>> + while (ht_size > 0) {
>>>> + int len = FFMIN(ht_size, INT32_MAX);
>>>> + skip_bits_long(&gb, len);
>>>> + ht_size -= len;
>>>> + }
>>> i dont think theres sense in supporting skiping of more than 500mb
>>> as valid packets should not have such sizes
>> This is done once per stream. Does the loop hurts so much to limit
>> ourselves to 32-bit?
>
> is it really allowed for that to be even remotely that large? or even
> possible? can the bitstream reader even handle that?
Ok, I removed the loop. If the check for (ht_size > INT32_MAX) is also
useless, I can remove that, too.
>>>> +/** Parses the bs_info item to extract the block partitioning.
>>>> + */
>>> without having read the spec, that says nothing to me ...
>>> can this be clarified in 1 sentance or is the reader required to have read
>>> the spec?
>> Reworded a bit. But I think if block partitioning is unclear, a much
>> better comment would be beyond one sentence and explains block switching.
>
> well, more explanation cant hurt, unless the spec explains it well in which
> case you could add a reference to the specfic part of the spec
Ok, reference added.
Thanks!
-Thilo
More information about the ffmpeg-devel
mailing list