aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kucera <daniel.kucera@gmail.com>2017-06-05 20:30:16 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-17 22:36:54 +0200
commitc557718bea35d39fc7e07a1d9d7cc6c7910643b8 (patch)
tree7b681d5a403396b5e590e679f2bdbc82c0c1a749
parentd4a900fad8b1fe23d304f508802147b200722251 (diff)
downloadffmpeg-c557718bea35d39fc7e07a1d9d7cc6c7910643b8.tar.gz
libavformat/file: return AVERROR_EOF on EOF
Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/file.c b/libavformat/file.c
index 264542a36a..3db9cd0b9e 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -112,6 +112,8 @@ static int file_read(URLContext *h, unsigned char *buf, int size)
ret = read(c->fd, buf, size);
if (ret == 0 && c->follow)
return AVERROR(EAGAIN);
+ if (ret == 0)
+ return AVERROR_EOF;
return (ret == -1) ? AVERROR(errno) : ret;
}