diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 3f34aeea3b..dd83165917 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -38,6 +38,8 @@ static gboolean gst_mpdparser_get_xml_prop_validated_string (xmlNode * a_node, gboolean (*validator) (const char *)); static gboolean gst_mpdparser_get_xml_prop_string (xmlNode * a_node, const gchar * property_name, gchar ** property_value); +static gboolean gst_mpdparser_get_xml_prop_string_stripped (xmlNode * a_node, + const gchar * property_name, gchar ** property_value); static gboolean gst_mpdparser_get_xml_ns_prop_string (xmlNode * a_node, const gchar * ns_name, const gchar * property_name, gchar ** property_value); @@ -310,6 +312,18 @@ gst_mpdparser_get_xml_prop_string (xmlNode * a_node, property_value, NULL); } +static gboolean +gst_mpdparser_get_xml_prop_string_stripped (xmlNode * a_node, + const gchar * property_name, gchar ** property_value) +{ + gboolean ret; + ret = + gst_mpdparser_get_xml_prop_string (a_node, property_name, property_value); + if (ret) + *property_value = g_strstrip (*property_value); + return ret; +} + static gboolean gst_mpdparser_validate_no_whitespace (const char *s) { @@ -1291,7 +1305,7 @@ gst_mpdparser_parse_descriptor_type_node (GList ** list, xmlNode * a_node) *list = g_list_append (*list, new_descriptor); GST_LOG ("attributes of %s node:", a_node->name); - gst_mpdparser_get_xml_prop_string (a_node, "schemeIdUri", + gst_mpdparser_get_xml_prop_string_stripped (a_node, "schemeIdUri", &new_descriptor->schemeIdUri); if (!gst_mpdparser_get_xml_prop_string (a_node, "value", &new_descriptor->value)) {