mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
improve states
This commit is contained in:
parent
e92e1acec4
commit
fd5f0d96f3
5 changed files with 21 additions and 14 deletions
|
|
@ -924,22 +924,24 @@ do_link_remove_done (SpaLoop *loop,
|
|||
spa_list_remove (&this->input_link);
|
||||
this->input->node->n_used_input_links--;
|
||||
|
||||
clear_port_buffers (this, this->input);
|
||||
|
||||
if (this->input->node->n_used_input_links == 0 &&
|
||||
this->input->node->n_used_output_links == 0)
|
||||
pinos_node_set_state (this->input->node, PINOS_NODE_STATE_IDLE);
|
||||
|
||||
clear_port_buffers (this, this->input);
|
||||
this->input = NULL;
|
||||
}
|
||||
if (this->output) {
|
||||
spa_list_remove (&this->output_link);
|
||||
this->output->node->n_used_output_links--;
|
||||
|
||||
clear_port_buffers (this, this->output);
|
||||
|
||||
if (this->output->node->n_used_input_links == 0 &&
|
||||
this->output->node->n_used_output_links == 0)
|
||||
pinos_node_set_state (this->output->node, PINOS_NODE_STATE_IDLE);
|
||||
|
||||
clear_port_buffers (this, this->output);
|
||||
this->output = NULL;
|
||||
}
|
||||
if (--impl->refcount == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue