changeset 35604:5be881b963ec

Add comment why seeking backward flag is used when seeking to the start.
author reimar
date Tue, 18 Dec 2012 20:00:11 +0000
parents ff4d8445f93e
children 71f19d352561
files libmpdemux/demux_lavf.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Tue Dec 18 19:33:29 2012 +0000
+++ b/libmpdemux/demux_lavf.c	Tue Dec 18 20:00:11 2012 +0000
@@ -685,6 +685,9 @@
       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)