mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
mpdparser: Only check stream->segments for a repeated last segment if we have a static list of segments
Otherwise we'll crash, trying to derefence NULL. And if we have no static list
of segments, we can't have repeated segments anyway.
Regression introduced by cfe2871a5e
https://bugzilla.gnome.org/show_bug.cgi?id=755411
This commit is contained in:
parent
6835c27e9f
commit
a25253130b
1 changed files with 2 additions and 1 deletions
|
@ -4057,7 +4057,8 @@ gst_mpd_client_has_next_segment (GstMpdClient * client,
|
|||
if (forward) {
|
||||
guint segments_count = gst_mpd_client_get_segments_counts (client, stream);
|
||||
|
||||
if (segments_count > 0 && stream->segment_index + 1 == segments_count) {
|
||||
if (segments_count > 0 && stream->segments
|
||||
&& stream->segment_index + 1 == segments_count) {
|
||||
GstMediaSegment *segment;
|
||||
|
||||
segment = g_ptr_array_index (stream->segments, stream->segment_index);
|
||||
|
|
Loading…
Reference in a new issue