gst/schedulers/gstoptimalscheduler.c: fix 147894-2 and the group_link problem.

Original commit message from CVS:
* gst/schedulers/gstoptimalscheduler.c: (remove_from_group),
(gst_opt_scheduler_pad_link):
fix 147894-2 and the group_link problem.
This commit is contained in:
Wim Taymans 2004-07-22 09:43:40 +00:00
parent efa80cd2c9
commit d5f0f798ac
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2004-07-22 Wim Taymans <wim@fluendo.com>
* gst/schedulers/gstoptimalscheduler.c: (remove_from_group),
(gst_opt_scheduler_pad_link):
fix 147894-2 and the group_link problem.
2004-07-22 Wim Taymans <wim@fluendo.com> 2004-07-22 Wim Taymans <wim@fluendo.com>
* testsuite/schedulers/147894-2.c: (queue_empty), (queue_filled), * testsuite/schedulers/147894-2.c: (queue_empty), (queue_filled),

View file

@ -915,6 +915,10 @@ remove_from_group (GstOptSchedulerGroup * group, GstElement * element)
* this element */ * this element */
group_dec_links_for_element (group, element); group_dec_links_for_element (group, element);
if (gst_element_get_state (element) == GST_STATE_PLAYING) {
group_element_set_enabled (group, element, FALSE);
}
group->elements = g_slist_remove (group->elements, element); group->elements = g_slist_remove (group->elements, element);
group->num_elements--; group->num_elements--;
@ -2117,7 +2121,7 @@ gst_opt_scheduler_pad_link (GstScheduler * sched, GstPad * srcpad,
if (!group1) { if (!group1) {
/* create a new group for src_element as it cannot be merged into another group /* create a new group for src_element as it cannot be merged into another group
* here. we create the group in the same chain as the loop-based element. note * here. we create the group in the same chain as the loop-based element. note
* that creating a new group will also increment the links with other groups */ * that creating a new group will not increment the links with other groups */
GST_DEBUG ("creating new group for element %s", GST_DEBUG ("creating new group for element %s",
GST_ELEMENT_NAME (src_element)); GST_ELEMENT_NAME (src_element));
group1 = group1 =
@ -2127,9 +2131,9 @@ gst_opt_scheduler_pad_link (GstScheduler * sched, GstPad * srcpad,
/* both elements are already in a group, make sure they are added to /* both elements are already in a group, make sure they are added to
* the same chain */ * the same chain */
merge_chains (group1->chain, group2->chain); merge_chains (group1->chain, group2->chain);
}
/* increment the group link counters */ /* increment the group link counters */
group_inc_link (group1, group2); group_inc_link (group1, group2);
}
break; break;
} }
case GST_OPT_INVALID: case GST_OPT_INVALID: