[Ffmpeg-cvslog] r7754 - trunk/libavcodec/cook.c

Loren Merritt lorenm
Mon Jan 29 14:45:37 CET 2007


On Mon, 29 Jan 2007, Benjamin Larsson wrote:
> M?ns Rullg?rd wrote:
>> banan <subversion at mplayerhq.hu> writes:
>>>
>>> -    off = (uint32_t)inbuffer % 4;
>>> +    off = (int)((long)inbuffer & 3);
>>
>> That (int) cast isn't needed.
>
> Well I'm unsure how 32 bit platforms will treat it, this way should be
> safe for both 32bits and 64bits. Feel free to change it if I'm wrong.

off is an int. So assignment to off inherently casts to int. This is true 
of any type, and has nothing to do with the number of bits.

--Loren Merritt



More information about the ffmpeg-cvslog mailing list