+2004-07-09 Wim Taymans <wim@fluendo.com>
+
+ * gst/schedulers/gstoptimalscheduler.c:
+ (gst_opt_scheduler_pad_link), (group_elements_set_visited),
+ (element_get_reachables_func), (element_get_reachables),
+ (debug_element), (rechain_group), (group_migrate_connected),
+ (gst_opt_scheduler_pad_unlink):
+ Do not try to migrate decoupled elements to a new group since
+ they are not added to groups.
+
2004-07-08 Benjamin Otte <otte@gnome.org>
* gst/gstelement.c: (gst_element_error_func):
GList *connected, *c;
GstOptSchedulerGroup *new_group = NULL;
GstOptSchedulerChain *chain;
+ gint len;
+
+ if (GST_ELEMENT_IS_DECOUPLED (element)) {
+ /* the element is decoupled and is therefore not in the group */
+ return NULL;
+ }
GST_LOG ("migrate connected elements to new group");
connected = element_get_reachables (element, group, brokenpad);
GST_LOG ("elements to move to new group:");
g_list_foreach (connected, (GFunc) debug_element, NULL);
- if (g_list_length (connected) == 1) {
+ len = g_list_length (connected);
+
+ if (len == 0) {
+ g_warning ("(internal error) found lost element %s",
+ gst_element_get_name (element));
+ return NULL;
+ } else if (len == 1) {
remove_from_group (group, GST_ELEMENT (connected->data));
GST_LOG ("not migrating to new group as the group is empty");
+ g_list_free (connected);
return NULL;
}