From e51975392d85e72801193123945a35fb5221248f Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 6 Mar 2011 19:59:29 +0100 Subject: avio: deprecate url_fgetc and remove all it uses Signed-off-by: Ronald S. Bultje --- libavformat/aviobuf.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libavformat/aviobuf.c') 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'; -- cgit v1.2.3