link: only idle when not already suspended

This commit is contained in:
Wim Taymans 2017-04-25 13:04:03 +02:00
parent 8804980c8f
commit 82d5ca1edc

View file

@ -971,8 +971,9 @@ do_link_remove_done (SpaLoop *loop,
clear_port_buffers (this, this->input); clear_port_buffers (this, this->input);
if (this->input->node->n_used_input_links == 0 && if (this->input->node->n_used_input_links == 0 &&
this->input->node->n_used_output_links == 0) this->input->node->n_used_output_links == 0 &&
pinos_node_update_state (this->input->node, PINOS_NODE_STATE_IDLE, NULL); this->input->node->state > PINOS_NODE_STATE_IDLE)
pinos_node_update_state (this->input->node, PINOS_NODE_STATE_IDLE, NULL);
this->input = NULL; this->input = NULL;
} }
@ -983,7 +984,8 @@ do_link_remove_done (SpaLoop *loop,
clear_port_buffers (this, this->output); clear_port_buffers (this, this->output);
if (this->output->node->n_used_input_links == 0 && if (this->output->node->n_used_input_links == 0 &&
this->output->node->n_used_output_links == 0) this->output->node->n_used_output_links == 0 &&
this->output->node->state > PINOS_NODE_STATE_IDLE)
pinos_node_update_state (this->output->node, PINOS_NODE_STATE_IDLE, NULL); pinos_node_update_state (this->output->node, PINOS_NODE_STATE_IDLE, NULL);
this->output = NULL; this->output = NULL;