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..
This commit is contained in:
Wim Taymans 2004-12-15 10:34:29 +00:00
parent a9c15fa51b
commit d960f7f99e
2 changed files with 20 additions and 0 deletions

View file

@ -1,3 +1,12 @@
2004-12-15 Wim Taymans <wim@fluendo.com>
* 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 <rbultje@ronald.bitfreak.net> 2004-12-15 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* docs/manual/advanced-autoplugging.xml: * docs/manual/advanced-autoplugging.xml:

View file

@ -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 /* if the element was an entry point in the group, clear the group's
* entry point, and mark it as unknown */ * entry point, and mark it as unknown */
if (group->entry == element) { 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->entry = NULL;
group->type = GST_OPT_SCHEDULER_GROUP_UNKNOWN; group->type = GST_OPT_SCHEDULER_GROUP_UNKNOWN;
} }
@ -2144,6 +2146,15 @@ group_elements_set_visited (GstOptSchedulerGroup * group, gboolean visited)
GST_ELEMENT_UNSET_VISITED (element); 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 * static GList *