mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
validate: Fix the way we check if _CONFIG is a list of structures
This commit is contained in:
parent
6439494f40
commit
a728a7df49
1 changed files with 5 additions and 2 deletions
|
@ -122,7 +122,7 @@ gst_structure_validate_name (const gchar * name)
|
||||||
g_return_val_if_fail (name != NULL, FALSE);
|
g_return_val_if_fail (name != NULL, FALSE);
|
||||||
|
|
||||||
if (G_UNLIKELY (!g_ascii_isalpha (*name))) {
|
if (G_UNLIKELY (!g_ascii_isalpha (*name))) {
|
||||||
GST_WARNING ("Invalid character '%c' at offset 0 in structure name: %s",
|
GST_INFO ("Invalid character '%c' at offset 0 in structure name: %s",
|
||||||
*name, name);
|
*name, name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -131,8 +131,11 @@ gst_structure_validate_name (const gchar * name)
|
||||||
s = &name[1];
|
s = &name[1];
|
||||||
while (*s && (g_ascii_isalnum (*s) || strchr ("/-_.:+", *s) != NULL))
|
while (*s && (g_ascii_isalnum (*s) || strchr ("/-_.:+", *s) != NULL))
|
||||||
s++;
|
s++;
|
||||||
|
if (*s == ',')
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
if (G_UNLIKELY (*s != '\0')) {
|
if (G_UNLIKELY (*s != '\0')) {
|
||||||
GST_WARNING ("Invalid character '%c' at offset %" G_GUINTPTR_FORMAT " in"
|
GST_INFO ("Invalid character '%c' at offset %" G_GUINTPTR_FORMAT " in"
|
||||||
" structure name: %s", *s, ((guintptr) s - (guintptr) name), name);
|
" structure name: %s", *s, ((guintptr) s - (guintptr) name), name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue