[FFmpeg-devel] [PATCH] avfilter/vf_find_rect: Use correct format specifier

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sun Apr 4 12:59:13 EEST 2021


Gyan Doshi:
> 
> 
> On 2021-04-04 15:01, Andreas Rheinhardt wrote:
>> Fixes the following GCC warning:
>> warning: format ‘%lld’ expects argument of type ‘long long int’,
>> but argument 4 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
> 
> Weird. I switched to lld because gcc (10.2) recommended it.
> 
> In fact, I just looked through the build log for my Windows build
> compiled minutes ago, and there's no warning.
> 

long int is 32bit on Windows, so int64_t can't be a typedef for long int
on said plattform; instead it is a typedef for long long int. That's why
one should use these PRIdx macros, because they will automatically be
converted to the correct system-dependent format specifier.

- Andreas


More information about the ffmpeg-devel mailing list