From cf3ca4b7576b60bed8e4ae66021e6f0d7779a4a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 24 Oct 2007 13:00:58 +0000 Subject: [PATCH] gst/gststructure.c: Also allow white space for names so we don't break backwards compatibility. Original commit message from CVS: * gst/gststructure.c: Also allow white space for names so we don't break backwards compatibility. --- ChangeLog | 6 ++++++ gst/gststructure.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3075326e90..84a7736f5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-24 Tim-Philipp Müller + + * gst/gststructure.c: + Also allow white space for names so we don't break + backwards compatibility. + 2007-10-22 Wim Taymans * docs/design/part-TODO.txt: diff --git a/gst/gststructure.c b/gst/gststructure.c index 0ed0785a3e..e996ca4f56 100644 --- a/gst/gststructure.c +++ b/gst/gststructure.c @@ -151,9 +151,10 @@ gst_structure_validate_name (const gchar * name) return FALSE; } + /* FIXME 0.11: don't allow spaces */ /* FIXME: test name string more */ s = &name[1]; - while (*s && (g_ascii_isalnum (*s) || strchr ("/-_.:+", *s) != NULL)) + while (*s && (g_ascii_isalnum (*s) || strchr ("/-_.:+ ", *s) != NULL)) s++; if (*s != '\0') { GST_WARNING ("Invalid character '%c' at offset %lu in structure name: %s", @@ -392,8 +393,8 @@ gst_structure_get_name_id (const GstStructure * structure) * @name: the new name of the structure * * Sets the name of the structure to the given @name. The string - * provided is copied before being used. It must be not empty, start with a - * letter and can be folled by letters, numbers and any of "/-_.:". + * provided is copied before being used. It must not be empty, start with a + * letter and can be followed by letters, numbers and any of "/-_.:". */ void gst_structure_set_name (GstStructure * structure, const gchar * name)