[FFmpeg-devel] [PATCH] lavfi/buffersink: cast to uint64_t before shifting.

James Almer jamrial at gmail.com
Tue Sep 8 21:47:41 EEST 2020


On 9/8/2020 3:36 PM, Nicolas George wrote:
> James Almer (12020-09-08):
>> You should use the stdint.h UINT64_C macro then, instead of casting.
> 
> I probably *could*. But I find casting more readable. What benefit do
> you see to them compared to casting?

It's a macro designed for this specific purpose. Figured it would be
proper, and we're using them in other parts of the code to shift the
values by more than 32 bits, like you're doing here. But yes, i should
have said could, not should.

I don't consider it less readable, and it's just as long as using a
cast, but of course it's up to you.


More information about the ffmpeg-devel mailing list