From: Sebastian Dröge Date: Tue, 22 Sep 2015 12:43:44 +0000 (+0200) Subject: mpdparser: Only check stream->segments for a repeated last segment if we have a stati... X-Git-Tag: 1.19.3~507^2~7967 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a25253130b573c842805439e424eb048c1ef9bbc;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 9172f55..743f7ff 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -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);