mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
dashdemux: prevent assertion when duration is unknown
Duration from segment being unknown is a issue from the MPD and not a programming issue, so the assert isn't useful here. Instead check and return an error code so the caller can fallback to alternatives
This commit is contained in:
parent
3030c25aed
commit
9a38127467
1 changed files with 2 additions and 1 deletions
|
@ -3566,7 +3566,8 @@ gst_mpd_client_get_segment_index_at_time (GstMpdClient * client,
|
|||
|
||||
/* TODO: Assumes all fragments are roughly the same duration */
|
||||
seg_duration = gst_mpd_client_get_next_fragment_duration (client, stream);
|
||||
g_assert (seg_duration > 0);
|
||||
if (seg_duration == 0)
|
||||
return -1;
|
||||
return diff / seg_duration;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue