summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-09-22 14:43:44 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-09-22 15:03:13 +0200
commita25253130b573c842805439e424eb048c1ef9bbc (patch)
treed1a74ab921aa63c6f9c01fd6578cb657a23e16d4
parent6835c27e9f9bdebc5120b839e105ca626936bbee (diff)
downloadgstreamer-plugins-bad-a25253130b573c842805439e424eb048c1ef9bbc.tar.gz
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
-rw-r--r--ext/dash/gstmpdparser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c
index 9172f552b..743f7ff6b 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);