mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-27 23:44:47 +00:00
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
1 changed files with 17 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue