mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
mpdparse: Clamp seek times to the availabilityStartTime
Otherwise we will seek to negative times, which are interpreted as unsigned integers later.
This commit is contained in:
parent
f9ada426d4
commit
64a2dcf582
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue