dash: do not use invalid stream duration

If it is is unknown, consider it infinite

https://bugzilla.gnome.org/show_bug.cgi?id=768460
This commit is contained in:
Thiago Santos 2016-07-16 15:29:42 -03:00
parent 6eef9971be
commit a94eef9357

View file

@ -3347,7 +3347,8 @@ gst_mpd_client_get_period_index_at_time (GstMpdClient * client,
for (idx = 0, iter = client->periods; iter; idx++, iter = g_list_next (iter)) { for (idx = 0, iter = client->periods; iter; idx++, iter = g_list_next (iter)) {
stream_period = iter->data; stream_period = iter->data;
if (stream_period->start <= time_offset if (stream_period->start <= time_offset
&& stream_period->start + stream_period->duration > time_offset) { && (!GST_CLOCK_TIME_IS_VALID (stream_period->duration)
|| stream_period->start + stream_period->duration > time_offset)) {
period_idx = idx; period_idx = idx;
break; break;
} }