[FFmpeg-devel] [PATCH] bprint: Remove custom vsnprintf

Derek Buitenhuis derek.buitenhuis at gmail.com
Fri Sep 7 15:05:28 CEST 2012


A proper implementation was introduced in
ba537202801d71711f1ef9306a6248dd2d426fa0 for MSVC, and
MinGW already has vsnprintf.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
 libavutil/bprint.c |   19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/libavutil/bprint.c b/libavutil/bprint.c
index 6e59f6b..f9d5d6a 100644
--- a/libavutil/bprint.c
+++ b/libavutil/bprint.c
@@ -26,25 +26,6 @@
 #include "error.h"
 #include "mem.h"
 
-#if defined(_WIN32)
-
-static int vsnprintf_fixed(char *s, size_t n, const char *format, va_list va)
-{
-    va_list va2;
-    int r;
-
-    va_copy(va2, va);
-    r = vsnprintf(s, n, format, va2);
-    va_end(va2);
-    if (r == -1)
-        r = _vscprintf(format, va);
-    return r;
-}
-
-#define vsnprintf vsnprintf_fixed
-
-#endif
-
 #define av_bprint_room(buf) ((buf)->size - FFMIN((buf)->len, (buf)->size))
 #define av_bprint_is_allocated(buf) ((buf)->str != (buf)->reserved_internal_buffer)
 
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list