gst/schedulers/gstoptimalscheduler.c: Fix bug where a flag was not updated on a decou...
authorWim Taymans <wim.taymans@gmail.com>
Wed, 15 Dec 2004 10:34:29 +0000 (10:34 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Wed, 15 Dec 2004 10:34:29 +0000 (10:34 +0000)
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
gst/schedulers/gstoptimalscheduler.c

index e046474..d0115d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * docs/manual/advanced-autoplugging.xml:
index 1e7f356..0348299 100644 (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
    * 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 *