[FFmpeg-devel] [PATCH] libavdevice/v4l2.c: av_log DEBUG cast

Luca Abeni lucabe72
Wed Feb 11 16:26:36 CET 2009

M?ns Rullg?rd wrote:
>>> Patrik Kullman wrote:
>>>> (long unsigned int) standard.id in av_log debug message
>>>> Prevents warning about wrong type in formatting.
>>> which kind of warning are you seeing?
>>> According to the documentation, id should be a __u64,
>> [...]
>> Looks like the correct patch is changing "PRIu64" in Lu (linux's __u64 
>> is not uint64_t...)
> %Lu is not a standard format specifier.

Opss... Sorry. I keep forgetting which one is standard and which one is
a gcc extension.

>  The standard modifier for
> "long long" is ll, but I'm not sure what the actual underlying type
> here is.

It looks like it is a 64bit unsigned integer. Now, as far as I understand
in some 64bit architectures both "unsigned long int" and "unsigned long
long int" are 64bit integers; but gcc and linux often disagree on the
definition (on x86_64, linux says "unsigned long long int" and gcc says
"unsigned long", I think)

I guess the best solution is to cast to uint64_t. Do you agree? Or do
you see any better solution?


More information about the ffmpeg-devel mailing list