[FFmpeg-devel] [PATCH] Set the eof flag if a fskip call fails

Reimar Döffinger Reimar.Doeffinger
Tue Jul 20 19:04:06 CEST 2010


On Mon, Jul 19, 2010 at 09:35:16PM +0300, Martin Storsj? wrote:
> If you think of fskip as fseek(cur), then yes, it should behave in the 
> same way, not setting the eof flag (unless it happens to do the seek by 
> reading, when it actually is set). If you instead think of fskip as 
> "advance the read pointer by reading x bytes but do not return them", 
> setting the eof flag if it fails would be the semantically correct thing.

That's not the way it is used though, in particular it is also used
with negative numbers.
The way it's really used is more "this is really only a tiny little seek,
so it should never fail and it's ok to just skip the error checking".



More information about the ffmpeg-devel mailing list