diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2021-01-19 10:29:09 -0300 |
---|---|---|
committer | Thibault Saunier <tsaunier@igalia.com> | 2021-02-10 16:14:47 -0300 |
commit | 15af1f2baf4b14906227b2ecb4fbe0a2de0344e6 (patch) | |
tree | e6437414c88cc92ccec007fbdd5f8ac59461e327 | |
parent | 78f8ae860eae551abc721e85e4319fe074828864 (diff) |
xml-formatter: Properly report error parsing restriction caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/227>
-rw-r--r-- | ges/ges-xml-formatter.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ges/ges-xml-formatter.c b/ges/ges-xml-formatter.c index cfbddcc1..409c5542 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 |