Commit 64a2dcf5 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

mpdparse: Clamp seek times to the availabilityStartTime

Otherwise we will seek to negative times, which are interpreted as unsigned
integers later.
parent f9ada426
......@@ -4534,6 +4534,10 @@ gst_mpd_client_seek_to_time (GstMpdClient * client, GDateTime * time)
ts_microseconds = g_date_time_difference (time, start);
g_date_time_unref (start);
/* Clamp to availability start time, otherwise calculations wrap around */
if (ts_microseconds < 0)
ts_microseconds = 0;
ts = ts_microseconds * GST_USECOND;
for (stream = client->active_streams; stream; stream = g_list_next (stream)) {
ret = ret & gst_mpd_client_stream_seek (client, stream->data, ts);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment