From c1bf0a091c4a0540b2496af1740a8947bf2de93e Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 26 Jun 2009 13:35:38 +0200 Subject: [PATCH] asfdemux: Convert index entry from presentation time to timestamps. We weren't taking the preroll into account previously, meaning that we were always seeking preroll nanoseconds too early... resulting in a lot of dropped packets (which are before the start time). This brings quit a bit closer to as-fast-as-possible seeking in asf files. --- gst/asfdemux/gstasfdemux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c index 98839f7..a9ec105 100644 --- a/gst/asfdemux/gstasfdemux.c +++ b/gst/asfdemux/gstasfdemux.c @@ -400,6 +400,8 @@ gst_asf_demux_seek_index_lookup (GstASFDemux * demux, guint * packet, */ idx_time = demux->sidx_interval * idx; + if (G_LIKELY (idx_time >= demux->preroll)) + idx_time -= demux->preroll; GST_DEBUG_OBJECT (demux, "%" GST_TIME_FORMAT " => packet %u at %" GST_TIME_FORMAT, GST_TIME_ARGS (seek_time), *packet, -- 2.7.4