@@ -201,7 +201,7 @@ static int cache_read(URLContext *h, unsigned char *buf, int size)
}
r = ffurl_read(c->inner, buf, size);
- if (r == 0 && size>0) {
+ if (r == AVERROR_EOF && size>0) {
c->is_true_eof = 1;
av_assert0(c->end >= c->logical_pos);
}
@@ -263,7 +263,7 @@ resolve_eof:
if (whence == SEEK_SET)
size = FFMIN(sizeof(tmp), pos - c->logical_pos);
ret = cache_read(h, tmp, size);
- if (ret == 0 && whence == SEEK_END) {
+ if (ret == AVERROR_EOF && whence == SEEK_END) {
av_assert0(c->is_true_eof);
goto resolve_eof;
}
Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com> --- libavformat/cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)