From c557718bea35d39fc7e07a1d9d7cc6c7910643b8 Mon Sep 17 00:00:00 2001 From: Daniel Kucera Date: Mon, 5 Jun 2017 20:30:16 +0200 Subject: libavformat/file: return AVERROR_EOF on EOF Signed-off-by: Daniel Kucera Reviewed-by: Nicolas George Signed-off-by: Michael Niedermayer --- libavformat/file.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat/file.c') 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; } -- cgit v1.2.3