[FFmpeg-devel] [RFC] Many formats return wrong position => seeking problems

Reimar Döffinger Reimar.Doeffinger
Sat Mar 7 18:33:07 CET 2009

On Sat, Mar 07, 2009 at 05:28:41PM +0100, Ivan Schreter wrote:
> av_read_frame() returns an AVPacket, containing file position in member 
> pos. If I reposition the file pointer to this position in the file, I 
> expect next av_read_frame() to return exactly the same packet (also with 
> same DTS/PTS, single exception being undefined DTS/PTS after repositioning).

Ok, while I do not know if it actually worked, I tried to design the
demuxers I worked on to work that way.

> As a side note, the seeking code I'm working on does parser 
> reinitialization before repositioning and next av_read_frame(), since 
> some parsers may store some state.

Indeed, though some demuxer store state without having to (I fixed one
of them some time ago).

More information about the ffmpeg-devel mailing list