qtdemux: Fix time returned for index at a byte offset

The logic for searching forwards/backwards was swapped
This commit is contained in:
Robert Swain 2010-02-04 12:00:03 +01:00 committed by Tim-Philipp Müller
parent c2eedfcceb
commit 8d4f70c5ce

View file

@ -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;
}