summaryrefslogtreecommitdiff
path: root/ext/dash
diff options
context:
space:
mode:
authorSeungha Yang <sh.yang@lge.com>2017-03-24 08:16:35 +0900
committerSebastian Dröge <sebastian@centricular.com>2017-04-09 10:54:01 +0300
commit41996ad9c0072af306eec92e869e2c0d1861084a (patch)
tree6d6753457fbd7e96c490750a6e6690f1a97506f6 /ext/dash
parent28e0bdb7fea26887fbc7da8470584c9665de0796 (diff)
downloadgstreamer-plugins-bad-41996ad9c0072af306eec92e869e2c0d1861084a.tar.gz
dashdemux: Fix SEEK of multi-period On-Demand profile
For each period, media presentation is the relative to the period-start time. So SIDX seek position should be target seek position minus period-start. Also, if presentationTimeOffset is defined, the value should be compensated https://bugzilla.gnome.org/show_bug.cgi?id=780397
Diffstat (limited to 'ext/dash')
-rw-r--r--ext/dash/gstdashdemux.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c
index 782c191c5..93e19000f 100644
--- a/ext/dash/gstdashdemux.c
+++ b/ext/dash/gstdashdemux.c
@@ -1341,6 +1341,18 @@ gst_dash_demux_stream_seek (GstAdaptiveDemuxStream * stream, gboolean forward,
forward, flags, ts, final_ts);
if (gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client)) {
+ GstClockTime period_start, offset;
+
+ period_start = gst_mpd_parser_get_period_start_time (dashdemux->client);
+ offset =
+ gst_mpd_parser_get_stream_presentation_offset (dashdemux->client,
+ dashstream->index);
+
+ if (G_UNLIKELY (ts < period_start))
+ ts = offset;
+ else
+ ts += offset - period_start;
+
if (last_index != dashstream->active_stream->segment_index ||
last_repeat != dashstream->active_stream->segment_repeat_index) {
GST_LOG_OBJECT (stream->pad,