[FFmpeg-devel] [PATCH] libavformat/file: return AVERROR_EOF on EOF
Daniel Kucera
daniel.kucera at gmail.com
Mon Jun 5 21:30:16 EEST 2017
Signed-off-by: Daniel Kucera <daniel.kucera at gmail.com>
---
libavformat/file.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/file.c b/libavformat/file.c
index 264542a36a..1fb83851c0 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;
}
--
2.11.0
More information about the ffmpeg-devel
mailing list