summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-02 17:48:45 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-04 11:26:02 -0500
commite16ead0716c2f988d1e26369a4c67b354ff86134 (patch)
treeb765d4e41ffe6e1aef32e0016c3349380e9f98c8 /libavformat/aviobuf.c
parent41d8555f72e3bc60cf93af2a1a4786b452fd2736 (diff)
lavf: deprecate get_strz() in favor of avio_get_str
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 5b2f9c0fe7..9807c467d4 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -675,20 +675,13 @@ unsigned int avio_rb32(AVIOContext *s)
return val;
}
+#if FF_API_OLD_AVIO
char *get_strz(AVIOContext *s, char *buf, int maxlen)
{
- int i = 0;
- char c;
-
- while ((c = avio_r8(s))) {
- if (i < maxlen-1)
- buf[i++] = c;
- }
-
- buf[i] = 0; /* Ensure null terminated, but may be truncated */
-
+ avio_get_str(s, INT_MAX, buf, maxlen);
return buf;
}
+#endif
int ff_get_line(AVIOContext *s, char *buf, int maxlen)
{