mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
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>
This commit is contained in:
parent
d4a900fad8
commit
c557718bea
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user