From 8d4f70c5ce9c4998edc4a9e32e2d65ae87946684 Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Thu, 4 Feb 2010 12:00:03 +0100 Subject: [PATCH] qtdemux: Fix time returned for index at a byte offset The logic for searching forwards/backwards was swapped --- gst/qtdemux/qtdemux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 2a3ff260e3..5e091aef8a 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -1423,8 +1423,8 @@ gst_qtdemux_find_sample (GstQTDemux * qtdemux, gint64 byte_pos, gboolean fw, } /* determine min/max time */ time = str->samples[i].timestamp + str->samples[i].pts_offset; - if (min_time == -1 || (fw && min_time > time) || - (!fw && min_time < time)) { + if (min_time == -1 || (!fw && min_time > time) || + (fw && min_time < time)) { min_time = time; ts_timescale = str->timescale; }