link: only idle node if all links are idle

This commit is contained in:
Wim Taymans 2018-09-25 17:09:22 +02:00
parent 74ebff6b7d
commit 0701428aec

View file

@ -100,9 +100,11 @@ static void pw_link_update_state(struct pw_link *link, enum pw_link_state state,
pw_link_activate(link);
}
else if (old == PW_LINK_STATE_PAUSED && state < PW_LINK_STATE_PAUSED) {
if (--out->n_ready_output_links == 0)
if (--out->n_ready_output_links == 0 &&
out->n_ready_input_links == 0)
pw_node_set_state(out, PW_NODE_STATE_IDLE);
if (--in->n_ready_input_links == 0)
if (--in->n_ready_input_links == 0 &&
in->n_ready_output_links == 0)
pw_node_set_state(in, PW_NODE_STATE_IDLE);
}