[FFmpeg-devel] [PATCH] clear s->error in avio_read

wm4 nfxjfg at googlemail.com
Fri Mar 24 09:47:06 EET 2017


On Mon, 20 Mar 2017 14:39:07 -0700
Fredrik Hubinette <hubbe-at-google.com at ffmpeg.org> wrote:

> It looks like the value in s->error also comes from an earlier call to
> avio_read().
> ogg_read_page tries to read 4439 bytes from the file. It has 524 bytes
> already buffered.
> fill_buffer() fails with an EIO, but because of the buffered bytes,
> avio_read()
> returns 524 and leaves the EIO in s->error.

Trying to understand this. Is this an EOF situation? As in, it tries to
read more bytes than there are left in the stream. In that case, there
should probably be no EIO, but AVERROR_EOF (and should possibly handled
specially if "short reads" are allowed in this case).

It might also be that I'm missing something completely.


More information about the ffmpeg-devel mailing list