[FFmpeg-devel] remove int readers

Måns Rullgård mans
Thu Jun 14 09:21:08 CEST 2007


"Ronald S. Bultje" <rsbultje at gmail.com> writes:

> Hi,
>
> On 6/14/07, mark cox <melbournemark+ffmpeg at gmail.com> wrote:
>>
>> -    seq  = (buf[2] << 8) | buf[3];
>> +    seq  = AV_RB16(buf + 2);
>>
>> Why have you changed all the indexes from [] to +. [] are preferred
>> because they avoid compiler warnings and are easier to read IMHO.
>
> Consistency with the rest of the code. I prefer &buf[2] also, but I try to
> conform to what's already there.

&buf[2] is IMO far harder to read than buf + 2, and it's ugly to
boot.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list