mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
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
This commit is contained in:
parent
28e0bdb7fe
commit
41996ad9c0
1 changed files with 12 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue