summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-06 19:59:29 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-07 10:51:21 -0500
commite51975392d85e72801193123945a35fb5221248f (patch)
tree3d08f63c4b923608f59a81b3705e6ed92492c54a /libavformat/aviobuf.c
parent655e45e7dfafc494044cc52f8889fc6da75eff6a (diff)
avio: deprecate url_fgetc and remove all it uses
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 290572435e..b21d3e3cf0 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -541,6 +541,7 @@ int avio_r8(AVIOContext *s)
return 0;
}
+#if FF_API_OLD_AVIO
int url_fgetc(AVIOContext *s)
{
if (s->buf_ptr >= s->buf_end)
@@ -549,6 +550,7 @@ int url_fgetc(AVIOContext *s)
return *s->buf_ptr++;
return URL_EOF;
}
+#endif
int avio_read(AVIOContext *s, unsigned char *buf, int size)
{
@@ -921,16 +923,16 @@ char *url_fgets(AVIOContext *s, char *buf, int buf_size)
int c;
char *q;
- c = url_fgetc(s);
- if (c == EOF)
+ c = avio_r8(s);
+ if (url_feof(s))
return NULL;
q = buf;
for(;;) {
- if (c == EOF || c == '\n')
+ if (url_feof(s) || c == '\n')
break;
if ((q - buf) < buf_size - 1)
*q++ = c;
- c = url_fgetc(s);
+ c = avio_r8(s);
}
if (buf_size > 0)
*q = '\0';