diff --git a/ChangeLog b/ChangeLog index 4d119b938e..6219087921 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-01-17 Wim Taymans + + * gst/schedulers/gstoptimalscheduler.c: (add_to_group), + (remove_from_group), (schedule_group), (normalize_group), + (gst_opt_scheduler_iterate): + Also ref/unref decoupled elements before iterating the + group since they are not added to the list of elements. + 2005-01-17 Ronald S. Bultje * docs/manual/highlevel-components.xml: diff --git a/gst/schedulers/gstoptimalscheduler.c b/gst/schedulers/gstoptimalscheduler.c index 0348299e2d..c90b1d4ced 100644 --- a/gst/schedulers/gstoptimalscheduler.c +++ b/gst/schedulers/gstoptimalscheduler.c @@ -1141,8 +1141,17 @@ schedule_group (GstOptSchedulerGroup * group) return FALSE; } else { GSList *l, *lcopy; + GstElement *entry = NULL; lcopy = g_slist_copy (group->elements); + /* also add entry point, this is made so that decoupled elements + * are also reffed since they are not added to the list of group + * elements. */ + if (group->entry && GST_ELEMENT_IS_DECOUPLED (group->entry)) { + entry = group->entry; + gst_object_ref (GST_OBJECT (entry)); + } + for (l = lcopy; l; l = l->next) { GstElement *e = (GstElement *) l->data; @@ -1161,8 +1170,8 @@ schedule_group (GstOptSchedulerGroup * group) gst_object_unref (GST_OBJECT (e)); } + gst_object_unref (GST_OBJECT (entry)); g_slist_free (lcopy); - } return TRUE; #endif