[FFmpeg-cvslog] libavformat/file: return AVERROR_EOF on EOF

Daniel Kucera git at videolan.org
Sat Jun 17 23:38:26 EEST 2017


ffmpeg | branch: master | Daniel Kucera <daniel.kucera at gmail.com> | Mon Jun  5 20:30:16 2017 +0200| [c557718bea35d39fc7e07a1d9d7cc6c7910643b8] | committer: Michael Niedermayer

libavformat/file: return AVERROR_EOF on EOF

Signed-off-by: Daniel Kucera <daniel.kucera at gmail.com>
Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c557718bea35d39fc7e07a1d9d7cc6c7910643b8
---

 libavformat/file.c | 2 ++
 1 file changed, 2 insertions(+)

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;
 }
 



More information about the ffmpeg-cvslog mailing list