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:
parent
b095026945
commit
fb2d3abca8
@ -4833,6 +4833,10 @@ gst_mpd_client_get_last_fragment_timestamp_end (GstMpdClient * client,
|
|||||||
stream = g_list_nth_data (client->active_streams, stream_idx);
|
stream = g_list_nth_data (client->active_streams, stream_idx);
|
||||||
g_return_val_if_fail (stream != NULL, 0);
|
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;
|
segment_idx = gst_mpd_client_get_segments_counts (client, stream) - 1;
|
||||||
currentChunk = g_ptr_array_index (stream->segments, segment_idx);
|
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);
|
stream_period = gst_mpdparser_get_stream_period (client);
|
||||||
*ts = stream_period->start + stream_period->duration;
|
*ts = stream_period->start + stream_period->duration;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user