[MPlayer-cvslog] r35698 - trunk/libmpdemux/demux_lavf.c

reimar subversion at mplayerhq.hu
Tue Dec 18 21:00:12 CET 2012


Author: reimar
Date: Tue Dec 18 21:00:11 2012
New Revision: 35698

Log:
Add comment why seeking backward flag is used when
seeking to the start.

Modified:
   trunk/libmpdemux/demux_lavf.c

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	Tue Dec 18 20:33:29 2012	(r35697)
+++ trunk/libmpdemux/demux_lavf.c	Tue Dec 18 21:00:11 2012	(r35698)
@@ -685,6 +685,9 @@ static void demux_seek_lavf(demuxer_t *d
       priv->last_pts = priv->avfc->start_time != AV_NOPTS_VALUE ?
                        priv->avfc->start_time : 0;
     }
+    // This is important also for SEEK_ABSOLUTE because seeking
+    // is done by dts, while start_time is relative to pts and thus
+    // usually too large.
     if (rel_seek_secs <= 0) avsflags = AVSEEK_FLAG_BACKWARD;
     if (flags & SEEK_FACTOR) {
       if (priv->avfc->duration == 0 || priv->avfc->duration == AV_NOPTS_VALUE)


More information about the MPlayer-cvslog mailing list