From: Thibault Saunier Date: Tue, 19 Jan 2021 13:29:09 +0000 (-0300) Subject: xml-formatter: Properly report error parsing restriction caps X-Git-Tag: 1.19.3~493^2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15af1f2baf4b14906227b2ecb4fbe0a2de0344e6;p=platform%2Fupstream%2Fgstreamer.git xml-formatter: Properly report error parsing restriction caps Part-of: --- diff --git a/ges/ges-xml-formatter.c b/ges/ges-xml-formatter.c index cfbddcc..409c554 100644 --- a/ges/ges-xml-formatter.c +++ b/ges/ges-xml-formatter.c @@ -434,6 +434,8 @@ _parse_track (GMarkupParseContext * context, const gchar * element_name, if (properties) { props = gst_structure_from_string (properties, NULL); + if (!props) + goto wrong_properties; } ges_base_xml_formatter_add_track (GES_BASE_XML_FORMATTER (self), track_type, @@ -460,6 +462,13 @@ convertion_failed: g_strerror (errno)); return; +wrong_properties: + gst_clear_caps (&caps); + g_set_error (error, G_MARKUP_ERROR, + G_MARKUP_ERROR_INVALID_CONTENT, + "element '%s', Can not create properties: %s'", element_name, properties); + return; + } static inline void