summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2010-01-16 17:02:52 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-01-16 17:02:52 +0100
commitb95eda9c9ab5c713a7574fea2bbd647bcaaea195 (patch)
tree260e0947c7bb6ffceacf011f8451870eb89d5fa7
parente476ff9883c19aec617ef9108c9f7fd0901950f5 (diff)
frei0r: Make sure that property names always start with a letter
Otherwise GLib throws assertions
-rw-r--r--gst/frei0r/gstfrei0r.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/frei0r/gstfrei0r.c b/gst/frei0r/gstfrei0r.c
index 3cfc939b7..0b750d6e8 100644
--- a/gst/frei0r/gstfrei0r.c
+++ b/gst/frei0r/gstfrei0r.c
@@ -73,6 +73,14 @@ gst_frei0r_klass_install_properties (GObjectClass * gobject_class,
prop_name = g_ascii_strdown (param_info->name, -1);
g_strcanon (prop_name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-+", '-');
+ /* satisfy glib2 (argname[0] must be [A-Za-z]) */
+ if (!((prop_name[0] >= 'a' && prop_name[0] <= 'z') ||
+ (prop_name[0] >= 'A' && prop_name[0] <= 'Z'))) {
+ gchar *tempstr = prop_name;
+
+ prop_name = g_strconcat ("param-", prop_name, NULL);
+ g_free (tempstr);
+ }
properties[i].prop_id = count;
properties[i].prop_idx = i;