mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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.
This commit is contained in:
parent
f90a9a8092
commit
86edbb954c
1 changed files with 6 additions and 2 deletions
|
@ -2882,11 +2882,15 @@ gst_element_dispose (GObject * object)
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
not_null:
|
not_null:
|
||||||
{
|
{
|
||||||
|
gboolean is_locked = gst_element_is_locked_state (element);
|
||||||
g_critical
|
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"
|
"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",
|
||||||
GST_OBJECT_NAME (element));
|
GST_OBJECT_NAME (element),
|
||||||
|
gst_element_state_get_name (GST_STATE (element)),
|
||||||
|
is_locked ? " (locked)" : "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue