summaryrefslogtreecommitdiff
authorStefan Kost <ensonic@users.sf.net>2009-08-31 21:00:57 (GMT)
committer Stefan Kost <ensonic@users.sf.net>2009-08-31 21:06:27 (GMT)
commit86edbb954c0e3ccad0286366e92859109899d572 (patch) (side-by-side diff)
tree638fffb8c54d132c2249e0f9ab79535dd4d827b5
parentf90a9a809220cb5c1702532fc62d2eb65650cee5 (diff)
downloadgstreamer-86edbb954c0e3ccad0286366e92859109899d572.zip
gstreamer-86edbb954c0e3ccad0286366e92859109899d572.tar.gz
debug: more detail in wrong-state-on-dispose error.
Also tell in which state the element actualy is and if it is eventualy state-locked.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--gst/gstelement.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/gstelement.c b/gst/gstelement.c
index ad1bf67..f32717c 100644
--- a/gst/gstelement.c
+++ b/gst/gstelement.c
@@ -2882,11 +2882,15 @@ gst_element_dispose (GObject * object)
/* ERRORS */
not_null:
{
+ gboolean is_locked = gst_element_is_locked_state (element);
g_critical
- ("\nTrying to dispose element %s, but it is not in the NULL state.\n"
+ ("\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",
- GST_OBJECT_NAME (element));
+ GST_OBJECT_NAME (element),
+ gst_element_state_get_name (GST_STATE (element)),
+ is_locked ? " (locked)" : "");
return;
}
}