mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-21 08:56:56 -05:00
proxy: add refcount to keep the proxy alive in demarshal
We need to keep the proxy alive during demarshal because the callbacks might decide to destroy the proxy.
This commit is contained in:
parent
58fd46ebd1
commit
84ec90da2d
3 changed files with 21 additions and 4 deletions
|
|
@ -557,7 +557,11 @@ on_remote_data(void *data, int fd, uint32_t mask)
|
|||
this, msg->opcode, msg->id);
|
||||
continue;
|
||||
}
|
||||
if (demarshal[msg->opcode].func(proxy, msg) < 0) {
|
||||
proxy->refcount++;
|
||||
res = demarshal[msg->opcode].func(proxy, msg);
|
||||
pw_proxy_unref(proxy);
|
||||
|
||||
if (res < 0) {
|
||||
pw_log_error (NAME" %p: invalid message received %u for %u",
|
||||
this, msg->opcode, msg->id);
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue