mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
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.
This commit is contained in:
parent
779ad060a4
commit
6d1eda9391
1 changed files with 6 additions and 1 deletions
|
@ -4563,9 +4563,14 @@ gst_mpd_client_get_next_segment_availability_end_time (GstMpdClient * client,
|
||||||
if (stream_period && stream_period->period) {
|
if (stream_period && stream_period->period) {
|
||||||
GstDateTime *t =
|
GstDateTime *t =
|
||||||
gst_mpd_client_add_time_difference (availability_start_time,
|
gst_mpd_client_add_time_difference (availability_start_time,
|
||||||
stream_period->start * 1000);
|
stream_period->start / 1000);
|
||||||
gst_date_time_unref (availability_start_time);
|
gst_date_time_unref (availability_start_time);
|
||||||
availability_start_time = t;
|
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;
|
offset = (1 + seg_idx) * seg_duration;
|
||||||
|
|
Loading…
Reference in a new issue