aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index df76507866..4f0c16c308 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -265,12 +265,22 @@ void put_be32(ByteIOContext *s, unsigned int val)
put_byte(s, val);
}
+#if FF_API_OLD_AVIO
void put_strz(ByteIOContext *s, const char *str)
{
- if (str)
- put_buffer(s, (const unsigned char *) str, strlen(str) + 1);
- else
+ avio_put_str(s, str);
+}
+#endif
+
+int avio_put_str(ByteIOContext *s, const char *str)
+{
+ int len = 1;
+ if (str) {
+ len += strlen(str);
+ put_buffer(s, (const unsigned char *) str, len);
+ } else
put_byte(s, 0);
+ return len;
}
int ff_get_v_length(uint64_t val){