mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
modules: don't add CLIENT_ID when lingering
Because the object is not destroyed when the client is destroyed and so the client.id might become invalid.
This commit is contained in:
parent
d560628e2a
commit
962d3b9127
2 changed files with 9 additions and 11 deletions
|
|
@ -117,18 +117,17 @@ static void *create_object(void *_data,
|
|||
if (factory_name == NULL)
|
||||
goto error_properties;
|
||||
|
||||
client = resource ? pw_resource_get_client(resource) : NULL;
|
||||
|
||||
pw_properties_setf(properties, PW_KEY_FACTORY_ID, "%d",
|
||||
pw_global_get_id(pw_impl_factory_get_global(data->this)));
|
||||
|
||||
if (client) {
|
||||
pw_properties_setf(properties, PW_KEY_CLIENT_ID, "%d",
|
||||
pw_global_get_id(pw_impl_client_get_global(client)));
|
||||
}
|
||||
str = pw_properties_get(properties, PW_KEY_OBJECT_LINGER);
|
||||
linger = str ? pw_properties_parse_bool(str) : false;
|
||||
|
||||
client = resource ? pw_resource_get_client(resource) : NULL;
|
||||
if (client && !linger) {
|
||||
pw_properties_setf(properties, PW_KEY_CLIENT_ID, "%d",
|
||||
pw_global_get_id(pw_impl_client_get_global(client)));
|
||||
}
|
||||
node = pw_spa_node_load(context,
|
||||
factory_name,
|
||||
PW_SPA_NODE_FLAG_ACTIVATE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue