diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-09-01 13:12:45 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-09-14 19:53:03 +0200 |
commit | bb05bbafd55833f18722ffc828186fa7710dc352 (patch) | |
tree | 4001f2879192cc6296ed705b9ab457f1e261ae60 | |
parent | cfe2871a5e3c5b1db20470927642b776e055a87a (diff) | |
download | gstreamer-plugins-bad-bb05bbafd55833f18722ffc828186fa7710dc352.tar.gz |
Revert "dashdemux: Include the period start in the fragment timestamps in all cases"
This reverts commit e671ad25a989cb21c62c7a5867c2090890ce49ba.
The timestamps should restart at 0 again for each period, but we have to
adjust the segment to map those timestamps to the actual stream time and
running time of that period.
Otherwise we would have timestamps that conflict with the ones from the tfdt
inside the MP4 container, which are restarting at 0 for each period.
https://bugzilla.gnome.org/show_bug.cgi?id=752409
-rw-r--r-- | ext/dash/gstmpdparser.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index ba0aa3388..2747280c0 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -3738,7 +3738,6 @@ gst_mpd_client_get_next_fragment_timestamp (GstMpdClient * client, GstClockTime duration = gst_mpd_client_get_segment_duration (client, stream, NULL); guint segments_count = gst_mpd_client_get_segments_counts (client, stream); - GstStreamPeriod *stream_period = gst_mpdparser_get_stream_period (client); g_return_val_if_fail (stream->cur_seg_template-> MultSegBaseType->SegmentTimeline == NULL, FALSE); @@ -3746,7 +3745,7 @@ gst_mpd_client_get_next_fragment_timestamp (GstMpdClient * client, && stream->segment_index >= segments_count)) { return FALSE; } - *ts = stream_period->start + stream->segment_index * duration; + *ts = stream->segment_index * duration; } return TRUE; @@ -3900,8 +3899,6 @@ gst_mpd_client_get_next_fragment (GstMpdClient * client, } } } else { - GstStreamPeriod *stream_period = gst_mpdparser_get_stream_period (client); - if (stream->cur_seg_template != NULL) { mediaURL = gst_mpdparser_build_URL_from_template (stream-> @@ -3926,8 +3923,7 @@ gst_mpd_client_get_next_fragment (GstMpdClient * client, GST_DEBUG ("mediaURL = %s", mediaURL); GST_DEBUG ("indexURL = %s", indexURL); - fragment->timestamp = - stream_period->start + stream->segment_index * fragment->duration; + fragment->timestamp = stream->segment_index * fragment->duration; } base_url = gst_uri_from_string (stream->baseURL); |