[FFmpeg-devel] [PATCH] libavformat/aviobuf.c: don't treat 0 from read_packet as EOF
Daniel Kučera
daniel.kucera at gmail.com
Fri Jun 2 16:08:49 EEST 2017
2017-06-02 15:02 GMT+02:00 Nicolas George <george at nsup.org>:
> Le quartidi 14 prairial, an CCXXV, Daniel Kučera a écrit :
>> Now I'm trying to pass fate. I've fixed some problems but don't have
>> an idea why it won't pass following test. Does anyone have idea?
>
> I suspect you need to fix lavf/file.c to actually return AVERROR_EOF.
>
I already did:
+++ 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;
}
S pozdravom / Best regards
Daniel Kucera.
More information about the ffmpeg-devel
mailing list