mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
client-node: only clear ports once
This commit is contained in:
parent
954da89756
commit
d4ab36d52a
1 changed files with 8 additions and 4 deletions
|
|
@ -557,12 +557,16 @@ clear_port(struct node *this, struct port *port)
|
|||
}
|
||||
|
||||
if (port->direction == SPA_DIRECTION_INPUT) {
|
||||
this->in_ports[port->id] = NULL;
|
||||
this->n_inputs--;
|
||||
if (this->in_ports[port->id] == port) {
|
||||
this->in_ports[port->id] = NULL;
|
||||
this->n_inputs--;
|
||||
}
|
||||
}
|
||||
else {
|
||||
this->out_ports[port->id] = NULL;
|
||||
this->n_outputs--;
|
||||
if (this->out_ports[port->id] == port) {
|
||||
this->out_ports[port->id] = NULL;
|
||||
this->n_outputs--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue