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 cfe2871a5e3c5b1db20470927642b776e055a87a https://bugzilla.gnome.org/show_bug.cgi?id=755411
This commit is contained in:
parent
6835c27e9f
commit
a25253130b
@ -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…
x
Reference in New Issue
Block a user