dashdemux: prevent crash by checking if the segment node is present

Do not try to access range data if there is no segment node
This commit is contained in:
Thiago Santos 2013-07-01 14:35:02 -03:00
parent d0befd39f0
commit d9c324c6c7

View file

@ -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;
}