Some sanity checking for when the element was removed from the pipeline.

Original commit message from CVS:
Some sanity checking for when the element was removed from the pipeline.
This commit is contained in:
Wim Taymans 2002-06-02 17:44:20 +00:00
parent 0694a337a1
commit 7e1a122599

View file

@ -324,9 +324,12 @@ gst_basic_scheduler_chain_wrapper (int argc, char *argv[])
/* due to oddities in the cothreads code, when this function returns it will
* switch to the main cothread. thus, we need to unlock the current element. */
if (SCHED (element)->current->post_run_func)
SCHED (element)->current->post_run_func (SCHED (element)->current);
SCHED (element)->current = NULL;
if (SCHED (element)) {
if (SCHED (element)->current && SCHED (element)->current->post_run_func) {
SCHED (element)->current->post_run_func (SCHED (element)->current);
}
SCHED (element)->current = NULL;
}
GST_DEBUG_LEAVE ("(%d,'%s')", argc, name);
gst_object_unref (GST_OBJECT (element));