From d960f7f99e71b5625627a9577db7412dfad36bc0 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 15 Dec 2004 10:34:29 +0000 Subject: [PATCH] gst/schedulers/gstoptimalscheduler.c: Fix bug where a flag was not updated on a decoupled entry point because we were... Original commit message from CVS: * gst/schedulers/gstoptimalscheduler.c: (add_to_group), (remove_from_group), (group_elements_set_visited), (normalize_group), (gst_opt_scheduler_iterate): Fix bug where a flag was not updated on a decoupled entry point because we were just checking the group element list and decoupled elements are not in that list.. --- ChangeLog | 9 +++++++++ gst/schedulers/gstoptimalscheduler.c | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index e046474f6d..d0115d5c44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-12-15 Wim Taymans + + * gst/schedulers/gstoptimalscheduler.c: (add_to_group), + (remove_from_group), (group_elements_set_visited), + (normalize_group), (gst_opt_scheduler_iterate): + Fix bug where a flag was not updated on a decoupled entry point + because we were just checking the group element list and decoupled + elements are not in that list.. + 2004-12-15 Ronald S. Bultje * docs/manual/advanced-autoplugging.xml: diff --git a/gst/schedulers/gstoptimalscheduler.c b/gst/schedulers/gstoptimalscheduler.c index 1e7f3560fe..0348299e2d 100644 --- a/gst/schedulers/gstoptimalscheduler.c +++ b/gst/schedulers/gstoptimalscheduler.c @@ -922,6 +922,8 @@ remove_from_group (GstOptSchedulerGroup * group, GstElement * element) /* if the element was an entry point in the group, clear the group's * entry point, and mark it as unknown */ if (group->entry == element) { + GST_DEBUG ("clearing element %p \"%s\" as entry from group %p", + element, GST_ELEMENT_NAME (element), group); group->entry = NULL; group->type = GST_OPT_SCHEDULER_GROUP_UNKNOWN; } @@ -2144,6 +2146,15 @@ group_elements_set_visited (GstOptSchedulerGroup * group, gboolean visited) GST_ELEMENT_UNSET_VISITED (element); } } + /* don't forget to set any decoupled entry points that are not accounted for in the + * element list (since they belong to two groups). */ + if (group->entry) { + if (visited) { + GST_ELEMENT_SET_VISITED (group->entry); + } else { + GST_ELEMENT_UNSET_VISITED (group->entry); + } + } } static GList *