mirror of
https://github.com/zoriya/Kyoo.Transcoder.git
synced 2025-12-06 06:26:11 +00:00
Fixing windows's aprintf
This commit is contained in:
@@ -21,4 +21,5 @@ API stream *extract_infos(const char *path,
|
||||
|
||||
API void destroy_stream(stream *s);
|
||||
|
||||
API void free_streams(stream *streamsPtr, unsigned count);
|
||||
API void free_streams(stream *streamsPtr, unsigned count);
|
||||
|
||||
|
||||
@@ -37,12 +37,12 @@ int vasprintf(char **buffer, const char *fmt, va_list args)
|
||||
int len;
|
||||
|
||||
va_copy(copy, args);
|
||||
len = vsprintf(NULL, fmt, args);
|
||||
len = _vscprintf(fmt, args);
|
||||
va_end(copy);
|
||||
|
||||
*buffer = malloc(sizeof(char) * (len + 1));
|
||||
if (!*buffer)
|
||||
return 0;
|
||||
return -1;
|
||||
vsprintf(*buffer, fmt, args);
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -19,4 +19,4 @@ API void free_streams(stream *s, unsigned count)
|
||||
for (unsigned i = 0; i < count; i++)
|
||||
destroy_stream(s + i);
|
||||
free(s);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user