From 0d50805678d1a0a4c10b0dbba4201d26261ada4b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 1 Sep 2009 10:03:35 +0100 Subject: [PATCH] element: don't take object lock for g_critical() and flesh out warning message some more --- gst/gstelement.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gst/gstelement.c b/gst/gstelement.c index f32717c..efb52b2 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -2882,12 +2882,16 @@ gst_element_dispose (GObject * object) /* ERRORS */ not_null: { - gboolean is_locked = gst_element_is_locked_state (element); + gboolean is_locked; + + is_locked = GST_OBJECT_FLAG_IS_SET (element, GST_ELEMENT_LOCKED_STATE); g_critical ("\nTrying to dispose element %s, but it is in %s%s instead of the NULL" " state.\n" "You need to explicitly set elements to the NULL state before\n" - "dropping the final reference, to allow them to clean up.\n", + "dropping the final reference, to allow them to clean up.\n" + "This problem may also be caused by a refcounting bug in the\n" + "application or some element.\n", GST_OBJECT_NAME (element), gst_element_state_get_name (GST_STATE (element)), is_locked ? " (locked)" : ""); -- 2.7.4