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

Michael Niedermayer michaelni at gmx.at
Thu Apr 12 21:42:17 CEST 2012


On Thu, Apr 12, 2012 at 07:59:32PM +0200, Reimar Döffinger wrote:
> 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?

our nut demuxer doesnt support seeking to non keyframes

also frame exact seeking looks alot easier with seek to pts than seek
to dts.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120412/83e9843f/attachment.asc>


More information about the ffmpeg-devel mailing list