[FFmpeg-devel] [PATCH] lavu: add snprintf(), vsnprint() and strtod() replacements for MS runtime.

jamal jamrial at gmail.com
Mon Aug 27 21:15:39 CEST 2012


On 27/08/12 12:32 PM, Michael Niedermayer wrote:
> On Mon, Aug 27, 2012 at 02:27:47AM -0300, jamal wrote:
>>> +    ret = vsnprintf(s, n - 1, fmt, ap);
>>
>> This should be _vsnprintf.
> 
> can you elaborate why ?
> MSDN (link above) says
> "vsnprintf is identical to _vsnprintf"
> 
I tested it on mingw (For this i forced configure to set HAVE_SNPRINTF as false), and as is ffmpeg would not print anything. Changing that line to _vsnprintf fixed it.
snprintf.h does a "#define vsnprintf avpriv_vsnprintf", so i figured avpriv_vsnprintf() was basically calling itself.

If this behaves as expected when using MSVC then disregard what i said.


More information about the ffmpeg-devel mailing list