diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-01-16 17:02:52 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-01-16 17:02:52 +0100 |
commit | b95eda9c9ab5c713a7574fea2bbd647bcaaea195 (patch) | |
tree | 260e0947c7bb6ffceacf011f8451870eb89d5fa7 /gst/frei0r | |
parent | e476ff9883c19aec617ef9108c9f7fd0901950f5 (diff) | |
download | gstreamer-plugins-bad-b95eda9c9ab5c713a7574fea2bbd647bcaaea195.tar.gz |
frei0r: Make sure that property names always start with a letter
Otherwise GLib throws assertions
Diffstat (limited to 'gst/frei0r')
-rw-r--r-- | gst/frei0r/gstfrei0r.c | 8 |
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; |