From f07281a771591b9b1bf65a17109e68ff54333e4a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 9 Dec 2002 20:33:27 +0000 Subject: [PATCH] Destroying the cothread seems like a good idea here Original commit message from CVS: Destroying the cothread seems like a good idea here --- gst/schedulers/gstbasicscheduler.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/schedulers/gstbasicscheduler.c b/gst/schedulers/gstbasicscheduler.c index be23f9b867..f80b972efa 100644 --- a/gst/schedulers/gstbasicscheduler.c +++ b/gst/schedulers/gstbasicscheduler.c @@ -983,8 +983,11 @@ gst_basic_scheduler_reset (GstScheduler *sched) GList *elements = GST_BASIC_SCHEDULER_CAST (sched)->elements; while (elements) { - /* FIXME: wingo, do we need to destroy the cothreads here? */ - GST_ELEMENT_THREADSTATE (elements->data) = NULL; + GstElement *element = GST_ELEMENT (elements->data); + if (GST_ELEMENT_THREADSTATE (element)) { + do_cothread_destroy (GST_ELEMENT_THREADSTATE (element)); + GST_ELEMENT_THREADSTATE (element) = NULL; + } elements = g_list_next (elements); }