[FFmpeg-devel] [PATCH] Add documentation that seeking is done by DTS and not PTS

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Apr 12 19:59:32 CEST 2012


On Thu, Apr 12, 2012 at 02:40:31PM +0200, Michael Niedermayer wrote:
> > diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> > index 5a11fdc..e4ec415 100644
> > --- a/libavformat/avformat.h
> > +++ b/libavformat/avformat.h
> > @@ -1456,6 +1456,9 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt);
> >  /**
> >   * Seek to the keyframe at timestamp.
> >   * 'timestamp' in 'stream_index'.
> > + *
> > + * Note that seeking is done by DTS and not by PTS.
> 
> this is not true for all demuxers, nut should be seeking to pts for
> example.

How can this work reliably considering that pts is not generally
monotonic and we have flags that allow seeking to non-keyframes?
I guess people requesting seeking to non-keyframe do kind of
expect a mess, but it seems like that might still give
quite confusing results.


More information about the ffmpeg-devel mailing list