From 3c683ead7b534cb4605823401119e3f03d3b63cb Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 26 Jun 2009 20:44:09 +0200 Subject: [PATCH] asfdemux: Use presentation timestamp when searching in the index. We need to take the preroll into account... else we end up too early. --- gst/asfdemux/gstasfdemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c index a9ec105..445cc24 100644 --- a/gst/asfdemux/gstasfdemux.c +++ b/gst/asfdemux/gstasfdemux.c @@ -381,7 +381,7 @@ gst_asf_demux_seek_index_lookup (GstASFDemux * demux, guint * packet, if (demux->sidx_num_entries == 0 || demux->sidx_interval == 0) return FALSE; - idx = (guint) (seek_time / demux->sidx_interval); + idx = (guint) ((seek_time + demux->preroll) / demux->sidx_interval); /* FIXME: seek beyond end of file should result in immediate EOS from * streaming thread instead of a failed seek */ -- 2.7.4