summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-08-16 08:49:35 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2015-08-16 08:49:35 -0300
commitae5befef5f2c148c7358c7413ff7dd8e24f1e3db (patch)
tree166b59730510e282d0b88d05a59a1e3b75baef98
parent7ea4a66b9fb943aaed27d7174cd58270211dbba3 (diff)
downloadgstreamer-plugins-bad-ae5befef5f2c148c7358c7413ff7dd8e24f1e3db.tar.gz
dashdemux: fix off by one seeking issue
When seeking to the last second of a mpd it would reject the seek because the comparison was < instead of <= This fails the important use case of seeking to the end of a file to play it back in reverse from the end
-rw-r--r--ext/dash/gstdashdemux.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c
index 06df497ba..5a1e1a513 100644
--- a/ext/dash/gstdashdemux.c
+++ b/ext/dash/gstdashdemux.c
@@ -1187,10 +1187,13 @@ gst_dash_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
period = list->data;
current_pos = period->start;
current_period = period->number;
- GST_DEBUG_OBJECT (demux, "Looking at period %u pos %" GST_TIME_FORMAT,
- current_period, GST_TIME_ARGS (current_pos));
+ GST_DEBUG_OBJECT (demux, "Looking at period %u) start:%"
+ GST_TIME_FORMAT " - duration:%"
+ GST_TIME_FORMAT ") for position %" GST_TIME_FORMAT,
+ current_period, GST_TIME_ARGS (current_pos),
+ GST_TIME_ARGS (period->duration), GST_TIME_ARGS (target_pos));
if (current_pos <= target_pos
- && target_pos < current_pos + period->duration) {
+ && target_pos <= current_pos + period->duration) {
break;
}
}