[FFmpeg-devel] [PATCH] Remove printf format string errors in windows builds

Larry Robinson silver-dad
Mon Jan 24 03:50:22 CET 2011

On 1/23/2011 6:06 PM, Ronald S. Bultje wrote:
> Hi,
> On Sun, Jan 23, 2011 at 9:03 PM, JonY<jon_y at users.sourceforge.net>  wrote:
>> Hash: SHA1
>> On 1/24/2011 09:55, Ronald S. Bultje wrote:
>>> Hi,
>>> On Sun, Jan 23, 2011 at 8:21 PM, Larry Robinson<silver-dad at comcast.net>  wrote:
>>>> Jean-Baptiste Kempf for pointing this out), but this is not yet implemented
>>>> for sscanf in Mingw-w64.
>>>> What breaks is a number of error messages which will print incorrectly, but
>>>> for a successful run these sections of code are not executed.
>>> bash-3.2$ grep -r sscanf .. 2>&1 | grep -v matches | grep %z
>>> bash-3.2$ grep -r sscanf .. 2>&1 | grep -v matches | grep %t
>>> bash-3.2$
>>> I don't see a problem.
>> Hi,
>> So, ffmpeg doesn't use any scanf format that msvcrt doesn't understand?
> I indeed think ffmpeg does not use such scanf formats. We only use
> %z/%t/etc for printf(), av_log() etc.
> Ronald
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
A few lines from my build on x86_64-w64-mingw32:

CC    libavcodec/h264.o
/home/Larry/Projects/ffmpeg/ffmpeg/libavcodec/h264.c:1:0: warning: -fPIC 
ignored for target (all code is position independent)
/home/Larry/Projects/ffmpeg/ffmpeg/libavcodec/h264.c: In function 
/home/Larry/Projects/ffmpeg/ffmpeg/libavcodec/h264.c:2539:17: warning: 
unknown conversion type character 't' in format
/home/Larry/Projects/ffmpeg/ffmpeg/libavcodec/h264.c:2539:17: warning: 
too many arguments for format

line 2539 in h264.c is:
av_log(h->s.avctx, AV_LOG_ERROR, "error while decoding MB %d %d, 
bytestream (%td)\n", s->mb_x, s->mb_y, h->cabac.bytestream_end - 

so it is indeed av_log that is generating the warnings.

Anyway I think M?ns Rullg?rd's suggestion to wait at least until we know 
what plans there are for implementing the proper functions in mingw-w64 
is probably best.

Larry Robinson

More information about the ffmpeg-devel mailing list