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.
This commit is contained in:
Edward Hervey 2009-06-26 13:35:38 +02:00
parent db5ddf927c
commit c1bf0a091c

View file

@ -400,6 +400,8 @@ gst_asf_demux_seek_index_lookup (GstASFDemux * demux, guint * packet,
*/ */
idx_time = demux->sidx_interval * idx; 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_DEBUG_OBJECT (demux, "%" GST_TIME_FORMAT " => packet %u at %"
GST_TIME_FORMAT, GST_TIME_ARGS (seek_time), *packet, GST_TIME_FORMAT, GST_TIME_ARGS (seek_time), *packet,