You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02: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:
committed by
Michael Niedermayer
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);
|
ret = read(c->fd, buf, size);
|
||||||
if (ret == 0 && c->follow)
|
if (ret == 0 && c->follow)
|
||||||
return AVERROR(EAGAIN);
|
return AVERROR(EAGAIN);
|
||||||
|
if (ret == 0)
|
||||||
|
return AVERROR_EOF;
|
||||||
return (ret == -1) ? AVERROR(errno) : ret;
|
return (ret == -1) ? AVERROR(errno) : ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user