improve states

This commit is contained in:
Wim Taymans 2017-01-19 20:07:03 +01:00
parent e92e1acec4
commit fd5f0d96f3
5 changed files with 21 additions and 14 deletions

View file

@ -243,11 +243,6 @@ do_remove_link_done (SpaLoop *loop,
}
}
if (node->n_used_output_links == 0 &&
node->n_used_input_links == 0) {
pinos_node_update_state (node, PINOS_NODE_STATE_IDLE, NULL);
}
if (!port->allocated) {
pinos_log_debug ("port %p: clear buffers on port", port);
spa_node_port_use_buffers (port->node->node,
@ -258,6 +253,11 @@ do_remove_link_done (SpaLoop *loop,
port->n_buffers = 0;
}
if (node->n_used_output_links == 0 &&
node->n_used_input_links == 0) {
pinos_node_update_state (node, PINOS_NODE_STATE_IDLE, NULL);
}
return SPA_RESULT_OK;
}