22 Jul 2012 21:05
[PATCH] [RFC] avoid _vscnprintf since it exists only since WinXP.
Reimar Döffinger <Reimar.Doeffinger <at> gmx.de>
2012-07-22 19:05:54 GMT
2012-07-22 19:05:54 GMT
The MSDN documentation is wrong, this function does not exist
on e.g. Win2k.
By my reading of the only case where it is used, this hack should work
almost as well, though it is ugly and comes with a risk of breaking
in the future.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger <at> gmx.de>
---
libavutil/bprint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/bprint.c b/libavutil/bprint.c
index 6e59f6b..8b4996e 100644
--- a/libavutil/bprint.c
+++ b/libavutil/bprint.c
<at> <at> -37,7 +37,7 <at> <at> static int vsnprintf_fixed(char *s, size_t n, const char *format, va_list va)
r = vsnprintf(s, n, format, va2);
va_end(va2);
if (r == -1)
- r = _vscprintf(format, va);
+ r = 2*n;
return r;
}
--
--
1.7.10.4
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel <at> ffmpeg.org
(Continue reading)
RSS Feed