diff options
author | Marton Balint <cus@passwd.hu> | 2019-08-05 21:50:42 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2019-08-17 18:39:49 +0200 |
commit | a82f8f2f10d0a4d8072919a8e4bdc1c39f4d27b8 (patch) | |
tree | 51c8f4f7fd363f309082bb116eb6716884a18e3e /libavformat/aviobuf.c | |
parent | 6a3bdf3148864224c8ef8025e8744f6dd2126303 (diff) |
avformat/avio: add avio_print_string_array and avio_print
These functions can be used to print a variable number of strings consecutively
to the IO context. Unlike av_bprintf, no temporary buffer is necessary.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index a69c30e0af..85d809c6cd 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -1259,6 +1259,12 @@ int avio_printf(AVIOContext *s, const char *fmt, ...) return ret; } +void avio_print_string_array(AVIOContext *s, const char *strings[]) +{ + for(; *strings; strings++) + avio_write(s, (const unsigned char *)*strings, strlen(*strings)); +} + int avio_pause(AVIOContext *s, int pause) { if (!s->read_pause) |