diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2015-09-07 12:09:41 +0100 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2015-09-07 12:52:03 +0100 |
commit | 6d1eda9391d3143b5fc633edfd94b89dbba209ab (patch) | |
tree | 6c8ce594deb6b1e7e7362ba0800c1ad9d1a529b6 | |
parent | 779ad060a4e7cd33782571485e4990a1efc3524b (diff) | |
download | gstreamer-plugins-bad-6d1eda9391d3143b5fc633edfd94b89dbba209ab.tar.gz |
mpdparser: fix period start time scaling
This GstStreamPeriod start value is expressed in nanoseconds,
and the glib time addition function expects microseconds.
There seems to have been a confusion with GstPeriodNode's start
field, which is expressed in milliseconds.
Additionally, add a warning if the timestamp modification did
not succeed, and NULL was returned.
-rw-r--r-- | ext/dash/gstmpdparser.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index ea5dc6bb1..c604c458c 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -4563,9 +4563,14 @@ gst_mpd_client_get_next_segment_availability_end_time (GstMpdClient * client, if (stream_period && stream_period->period) { GstDateTime *t = gst_mpd_client_add_time_difference (availability_start_time, - stream_period->start * 1000); + stream_period->start / 1000); gst_date_time_unref (availability_start_time); availability_start_time = t; + + if (availability_start_time == NULL) { + GST_WARNING_OBJECT (client, "Failed to offset availability_start_time"); + return NULL; + } } offset = (1 + seg_idx) * seg_duration; |