GNOME Bugzilla – Bug 647760
Setting elements to NULL before removing from a bin could lead to assertions
Last modified: 2011-05-14 10:28:07 UTC
Setting elements to NULL before removing from a bin could lead to assertions because the element could be set to something >NULL right before removing the element, e.g. by the async state change thread. Not sure what can be done about this. In any case this leads to assertions because the element will get destroying in a non-NULL state now usually.
In farsight2, I use two different recipes for that.. Either call gst_element_set_locked_state(TRUE) before setting to NULL or I keep a ref, remove, set to NULL, unref.
That's the two solutions I had in mind too. But I know it is done wrong in a million places, maybe something could be done in core to prevent this. But it's good to know that I'm not the only one who sees a problem here :)
Ok, let's resolve this as NOTABUG then