mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
smoothstreaming: Handle invalid XML
Nothing guarantees the manifest is valid and will return a root node
This commit is contained in:
parent
26108d829b
commit
6e1e87d403
1 changed files with 5 additions and 0 deletions
|
@ -354,6 +354,11 @@ gst_mss_manifest_new (GstBuffer * data)
|
|||
manifest->xml = xmlReadMemory ((const gchar *) mapinfo.data,
|
||||
mapinfo.size, "manifest", NULL, 0);
|
||||
root = manifest->xmlrootnode = xmlDocGetRootElement (manifest->xml);
|
||||
if (root == NULL) {
|
||||
GST_WARNING ("No root node ! Invalid manifest");
|
||||
gst_mss_manifest_free (manifest);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
live_str = (gchar *) xmlGetProp (root, (xmlChar *) "IsLive");
|
||||
if (live_str) {
|
||||
|
|
Loading…
Reference in a new issue