mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Improve padding
Write out 0 while padding to make sure all memory is initialized Remove the fd from the loop before destroying the node.
This commit is contained in:
parent
a1dad30fd1
commit
905743dac6
8 changed files with 81 additions and 78 deletions
|
|
@ -1124,10 +1124,6 @@ proxy_clear (SpaProxy *this)
|
|||
if (this->out_ports[i].valid)
|
||||
clear_port (this, &this->out_ports[i], SPA_DIRECTION_OUTPUT, i);
|
||||
}
|
||||
if (this->data_source.fd != -1) {
|
||||
spa_loop_remove_source (this->data_loop, &this->data_source);
|
||||
close (this->data_source.fd);
|
||||
}
|
||||
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
|
@ -1137,6 +1133,7 @@ client_node_resource_destroy (PinosResource *resource)
|
|||
{
|
||||
PinosClientNode *this = resource->object;
|
||||
PinosClientNodeImpl *impl = SPA_CONTAINER_OF (this, PinosClientNodeImpl, this);
|
||||
SpaProxy *proxy = &impl->proxy;
|
||||
|
||||
pinos_log_debug ("client-node %p: destroy", impl);
|
||||
pinos_signal_emit (&this->destroy_signal, this);
|
||||
|
|
@ -1147,6 +1144,12 @@ client_node_resource_destroy (PinosResource *resource)
|
|||
pinos_signal_remove (&impl->loop_changed);
|
||||
pinos_signal_remove (&impl->transport_changed);
|
||||
|
||||
if (proxy->data_source.fd != -1) {
|
||||
spa_loop_remove_source (proxy->data_loop, &proxy->data_source);
|
||||
close (proxy->data_source.fd);
|
||||
proxy->data_source.fd = -1;
|
||||
}
|
||||
|
||||
pinos_node_destroy (this->node);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue