[FFmpeg-devel] [PATCH]lavu/internal: Never use %t and %z on Windows

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Dec 20 04:15:33 EET 2016


Hi!

Attached patch is supposed to fix an issue reported by Blake Senftner 
on libav-user.

Please comment, Carl Eugen
-------------- next part --------------
From dbb730692ebb81377bc3db0df50b3c32ca0def16 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos at ag.or.at>
Date: Tue, 20 Dec 2016 03:11:54 +0100
Subject: [PATCH] lavu/internal: Never use %t or %z format specifiers, not
 even with mingw.

Fixes using an av_log() callback with mingw libraries in Visual Studio.
---
 configure            |    2 ++
 libavutil/internal.h |    3 +++
 2 files changed, 5 insertions(+)

diff --git a/configure b/configure
index 9dfd006..70993de 100755
--- a/configure
+++ b/configure
@@ -2052,6 +2052,8 @@ HAVE_LIST="
     dos_paths
     dxva2_lib
     dxva2api_cobj
+    libc_mingw32
+    libc_mingw64
     libc_msvcrt
     libdc1394_1
     libdc1394_2
diff --git a/libavutil/internal.h b/libavutil/internal.h
index e995af9..e994e8a 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -245,6 +245,9 @@ void avpriv_request_sample(void *avc,
 
 #define avpriv_open ff_open
 #define avpriv_tempfile ff_tempfile
+#endif
+
+#if HAVE_LIBC_MSVCRT || HAVE_LIBC_MINGW32 || HAVE_LIBC_MINGW64
 #define PTRDIFF_SPECIFIER "Id"
 #define SIZE_SPECIFIER "Iu"
 #else
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list