dashdemux: fixed illegal memory access in gst_mpd_client_get_last_fragment_timestamp_end

https://bugzilla.gnome.org/show_bug.cgi?id=758188
This commit is contained in:
Florin Apostol 2015-11-16 17:25:34 +00:00 committed by Sebastian Dröge
parent b095026945
commit fb2d3abca8

View file

@ -4833,6 +4833,10 @@ gst_mpd_client_get_last_fragment_timestamp_end (GstMpdClient * client,
stream = g_list_nth_data (client->active_streams, stream_idx);
g_return_val_if_fail (stream != NULL, 0);
if (!stream->segments) {
stream_period = gst_mpdparser_get_stream_period (client);
*ts = stream_period->start + stream_period->duration;
} else {
segment_idx = gst_mpd_client_get_segments_counts (client, stream) - 1;
currentChunk = g_ptr_array_index (stream->segments, segment_idx);
@ -4848,6 +4852,7 @@ gst_mpd_client_get_last_fragment_timestamp_end (GstMpdClient * client,
stream_period = gst_mpdparser_get_stream_period (client);
*ts = stream_period->start + stream_period->duration;
}
}
return TRUE;
}