summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 7d84b2b293..7fbe4ce76c 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -381,6 +381,18 @@ int url_setbufsize(AVIOContext *s, int buf_size)
{
return ffio_set_buf_size(s, buf_size);
}
+int url_fprintf(AVIOContext *s, const char *fmt, ...)
+{
+ va_list ap;
+ char buf[4096];
+ int ret;
+
+ va_start(ap, fmt);
+ ret = vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+ avio_write(s, buf, strlen(buf));
+ return ret;
+}
#endif
int avio_put_str(AVIOContext *s, const char *str)
@@ -913,7 +925,7 @@ URLContext *url_fileno(AVIOContext *s)
}
#if CONFIG_MUXERS
-int url_fprintf(AVIOContext *s, const char *fmt, ...)
+int avio_printf(AVIOContext *s, const char *fmt, ...)
{
va_list ap;
char buf[4096];