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

Patrik Kullman patrik
Tue Feb 10 19:38:49 CET 2009


On Tue, 2009-02-10 at 19:24 +0000, Luca Abeni wrote:
> Luca Abeni wrote:
> > Hi,
> > 
> > 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...)
> 
> Something like the following (warning: might have some witespace damage):
> Index: libavdevice/v4l2.c
> ===================================================================
> --- libavdevice/v4l2.c  (revision 17020)
> +++ libavdevice/v4l2.c  (working copy)
> @@ -494,7 +494,7 @@
>               }
>           }
> 
> -        av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s, id: 
> %"PRIu64"\n",
> +        av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s, id: 
> %Lu\n",
>                  ap->standard, standard.id);
>           if (ioctl(s->fd, VIDIOC_S_STD, &standard.id) < 0) {
>               av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set 
> standard(%s) failed\n",
> 
> Does this work for you?
> If yes, I'll commit tomorrow.
> 

Compiles cleanly for me.
But check M?ns' comment about standard format specifiers.






More information about the ffmpeg-devel mailing list