Browse Source

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>
tags/n3.4
Daniel Kucera Michael Niedermayer 8 years ago
parent
commit
c557718bea
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/file.c

+ 2
- 0
libavformat/file.c View File

@@ -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…
Cancel
Save