[FFmpeg-devel] [RFC][PATCH] avformat/flvdec: avoid reseting eof_reached to 0 silently
h.leppkes at gmail.com
Fri Apr 10 13:25:08 CEST 2015
On Wed, Apr 8, 2015 at 5:28 PM, Zhang Rui <bbcallen at gmail.com> wrote:
> avio_feof() and avio_seek() could reset eof_reached to 0,
> after some silent IO error in avio_r*(). And the reconnection
> caused by seek makes demuxer to continue read at wrong position.
While this may technically be a problem somehow, your replacement seek
function is kinda weird.
If its using SEEK_SET or SEEK_CUR with a positive offset, it could
easily set or retain the current EOF flag, and that should be fixed
inside that function.
The same thing really applies to avio_skip. If its at EOF before the
skip, then it definitely will be at EOF after the skip as well, and
the function should be fixed accordingly, and not some wrapper built
The only "odd" case is seeking backwards from EOF. It may be wanted or
More information about the ffmpeg-devel