mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
mssdemux: mssmanifest: prevent accessing null stream fragment
Move the access to the stream fragment data after the check if the fragment exists to prevent a segfault
This commit is contained in:
parent
ca4e5c34cb
commit
96522f474c
1 changed files with 3 additions and 1 deletions
|
@ -346,11 +346,13 @@ gst_mss_stream_get_fragment_url (GstMssStream * stream, gchar ** url)
|
||||||
gchar *tmp;
|
gchar *tmp;
|
||||||
gchar *bitrate_str;
|
gchar *bitrate_str;
|
||||||
gchar *start_time_str;
|
gchar *start_time_str;
|
||||||
GstMssStreamFragment *fragment = stream->current_fragment->data;
|
GstMssStreamFragment *fragment;
|
||||||
|
|
||||||
if (stream->current_fragment == NULL) /* stream is over */
|
if (stream->current_fragment == NULL) /* stream is over */
|
||||||
return GST_FLOW_UNEXPECTED;
|
return GST_FLOW_UNEXPECTED;
|
||||||
|
|
||||||
|
fragment = stream->current_fragment->data;
|
||||||
|
|
||||||
bitrate_str =
|
bitrate_str =
|
||||||
(gchar *) xmlGetProp (stream->current_quality->data,
|
(gchar *) xmlGetProp (stream->current_quality->data,
|
||||||
(xmlChar *) MSS_PROP_BITRATE);
|
(xmlChar *) MSS_PROP_BITRATE);
|
||||||
|
|
Loading…
Reference in a new issue