From d9c324c6c7c1dcbce2e3c43be8d0c02629d88ed0 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Mon, 1 Jul 2013 14:35:02 -0300 Subject: [PATCH] dashdemux: prevent crash by checking if the segment node is present Do not try to access range data if there is no segment node --- ext/dash/gstmpdparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 9ab4dd563e..aa17910ab4 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -3319,7 +3319,7 @@ gst_mpd_client_get_next_fragment (GstMpdClient * client, *discontinuity = segment_idx != currentChunk->number; *range_start = 0; *range_end = -1; - if (currentChunk->SegmentURL->mediaRange) { + if (currentChunk->SegmentURL && currentChunk->SegmentURL->mediaRange) { *range_start = currentChunk->SegmentURL->mediaRange->first_byte_pos; *range_end = currentChunk->SegmentURL->mediaRange->last_byte_pos; }