aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-07 21:50:25 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-07 17:20:31 -0500
commit66e5b1df360a28b083bc9ec5a76e7add5f40ce1f (patch)
tree2de95f70d35fd95832de9db9c1061270dcf8ae19 /libavformat/aviobuf.c
parent6a7e074eb98c4d45898d7f2920312db6899ee650 (diff)
downloadffmpeg-66e5b1df360a28b083bc9ec5a76e7add5f40ce1f.tar.gz
avio: deprecate url_feof
AVIOContext.eof_reached should be used directly instead. 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 7762d6cace..d0f63df3d2 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -265,12 +265,14 @@ int64_t avio_size(AVIOContext *s)
return size;
}
+#if FF_API_OLD_AVIO
int url_feof(AVIOContext *s)
{
if(!s)
return 0;
return s->eof_reached;
}
+#endif
int url_ferror(AVIOContext *s)
{
@@ -598,7 +600,7 @@ int avio_read(AVIOContext *s, unsigned char *buf, int size)
}
if (size1 == size) {
if (url_ferror(s)) return url_ferror(s);
- if (url_feof(s)) return AVERROR_EOF;
+ if (s->eof_reached) return AVERROR_EOF;
}
return size1 - size;
}
@@ -621,7 +623,7 @@ int ffio_read_partial(AVIOContext *s, unsigned char *buf, int size)
s->buf_ptr += len;
if (!len) {
if (url_ferror(s)) return url_ferror(s);
- if (url_feof(s)) return AVERROR_EOF;
+ if (s->eof_reached) return AVERROR_EOF;
}
return len;
}
@@ -928,11 +930,11 @@ char *url_fgets(AVIOContext *s, char *buf, int buf_size)
char *q;
c = avio_r8(s);
- if (url_feof(s))
+ if (s->eof_reached)
return NULL;
q = buf;
for(;;) {
- if (url_feof(s) || c == '\n')
+ if (s->eof_reached || c == '\n')
break;
if ((q - buf) < buf_size - 1)
*q++ = c;