gst/gstobject.c: Unref the GEnumClass after usage again. Fixes bug #561501.

Original commit message from CVS:
Patch by: Andrew Feren <acferen at yahoo dot com>
* gst/gstobject.c: (gst_object_default_deep_notify):
Unref the GEnumClass after usage again. Fixes bug #561501.
This commit is contained in:
Andrew Feren 2008-11-19 12:20:03 +00:00 committed by Sebastian Dröge
parent 9184d9ee3c
commit 604382bfb5
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2008-11-19 Sebastian Dröge <sebastian.droege@collabora.co.uk>
Patch by: Andrew Feren <acferen at yahoo dot com>
* gst/gstobject.c: (gst_object_default_deep_notify):
Unref the GEnumClass after usage again. Fixes bug #561501.
2008-11-19 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/gstbin.c: (_gst_boolean_accumulator), (gst_bin_class_init),

View file

@ -571,13 +571,13 @@ gst_object_default_deep_notify (GObject * object, GstObject * orig,
/* FIXME: handle flags */
if (G_IS_PARAM_SPEC_ENUM (pspec)) {
GEnumValue *enum_value;
GEnumClass *klass = G_ENUM_CLASS (g_type_class_ref (pspec->value_type));
enum_value =
g_enum_get_value (G_ENUM_CLASS (g_type_class_ref (pspec->value_type)),
g_value_get_enum (&value));
enum_value = g_enum_get_value (klass, g_value_get_enum (&value));
str = g_strdup_printf ("%s (%d)", enum_value->value_nick,
enum_value->value);
g_type_class_unref (klass);
} else {
str = g_strdup_value_contents (&value);
}