diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-03-02 19:48:45 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-03-05 04:29:28 +0300 |
commit | 773947ba76c575abc01ba128206c87440dad40ec (patch) | |
tree | 9646d04486dcf7b62e90451b0e88dd76c2140ae4 /libavformat/aviobuf.c | |
parent | 3e1a8e1ec1897086f063667480ec1a0eafd03392 (diff) |
lavf: deprecate get_strz() in favor of avio_get_str
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e16ead0716c2f988d1e26369a4c67b354ff86134)
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 13 |
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) { |