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

Michael Niedermayer michaelni
Sat Mar 7 18:22:50 CET 2009

On Sat, Mar 07, 2009 at 05:28:41PM +0100, Ivan Schreter wrote:
> Reimar D?ffinger wrote:
> > On Sat, Mar 07, 2009 at 03:43:12PM +0100, Ivan Schreter wrote:
> >   
> >> I'm writing some low-level support for new seeking API. In principle, it 
> >> works OK now, but many format demuxers in lavf are broken in the sense 
> >> that they don't return correct packet positions. This is mandatory for 
> >> new seeking API and for corrections to current seeking API as well.
> >>     
> >
> > Can you please define what "correct position" means? That would make it
> > easier to know which are broken and how to fix them (or alternatively
> > flame you if the requirements are too restrictive ;-) ).
> >   
> Well, quite easy:
> 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).

in that sense most formats do not have a position, as they will never work
once you touch the file pointer, their demuxers rather need various parts
of their internal state updated
and code that does this exists and works.

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090307/a95c6992/attachment.pgp>

More information about the ffmpeg-devel mailing list