From: Andrew Feren Date: Wed, 19 Nov 2008 12:20:03 +0000 (+0000) Subject: gst/gstobject.c: Unref the GEnumClass after usage again. Fixes bug #561501. X-Git-Tag: GIT_CONVERSION~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=604382bfb5960e84849843f80453919ba3bbfe02;p=platform%2Fupstream%2Fgstreamer.git gst/gstobject.c: Unref the GEnumClass after usage again. Fixes bug #561501. Original commit message from CVS: Patch by: Andrew Feren * gst/gstobject.c: (gst_object_default_deep_notify): Unref the GEnumClass after usage again. Fixes bug #561501. --- diff --git a/ChangeLog b/ChangeLog index b34cd16..e5bbf1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-19 Sebastian Dröge + + Patch by: Andrew Feren + + * gst/gstobject.c: (gst_object_default_deep_notify): + Unref the GEnumClass after usage again. Fixes bug #561501. + 2008-11-19 Wim Taymans * gst/gstbin.c: (_gst_boolean_accumulator), (gst_bin_class_init), diff --git a/gst/gstobject.c b/gst/gstobject.c index aae86e7..10804cb 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -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); }