mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
examples: copy properties for pw_remote_export()
pw_remote_export() takes ownership of the properties so make a copy of the ones we still want to hold on to.
This commit is contained in:
parent
68fc530d9c
commit
c59af4debc
3 changed files with 3 additions and 3 deletions
|
|
@ -372,7 +372,7 @@ static struct alsa_object *alsa_create_object(struct monitor *monitor, uint32_t
|
||||||
update_device_props(obj);
|
update_device_props(obj);
|
||||||
|
|
||||||
obj->proxy = pw_remote_export(impl->remote,
|
obj->proxy = pw_remote_export(impl->remote,
|
||||||
info->type, obj->props, obj->device, 0);
|
info->type, pw_properties_copy(obj->props), obj->device, 0);
|
||||||
if (obj->proxy == NULL) {
|
if (obj->proxy == NULL) {
|
||||||
res = -errno;
|
res = -errno;
|
||||||
goto clean_object;
|
goto clean_object;
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ static struct bluez5_object *bluez5_create_object(struct monitor *monitor, uint3
|
||||||
obj->device = iface;
|
obj->device = iface;
|
||||||
obj->props = pw_properties_new_dict(info->props);
|
obj->props = pw_properties_new_dict(info->props);
|
||||||
obj->proxy = pw_remote_export(impl->remote,
|
obj->proxy = pw_remote_export(impl->remote,
|
||||||
info->type, obj->props, obj->device, 0);
|
info->type, pw_properties_copy(obj->props), obj->device, 0);
|
||||||
if (obj->proxy == NULL) {
|
if (obj->proxy == NULL) {
|
||||||
res = -errno;
|
res = -errno;
|
||||||
goto clean_object;
|
goto clean_object;
|
||||||
|
|
|
||||||
|
|
@ -284,7 +284,7 @@ static struct v4l2_object *v4l2_create_object(struct monitor *monitor, uint32_t
|
||||||
v4l2_update_device_props(obj);
|
v4l2_update_device_props(obj);
|
||||||
|
|
||||||
obj->proxy = pw_remote_export(impl->remote,
|
obj->proxy = pw_remote_export(impl->remote,
|
||||||
info->type, obj->props, obj->device, 0);
|
info->type, pw_properties_copy(obj->props), obj->device, 0);
|
||||||
if (obj->proxy == NULL) {
|
if (obj->proxy == NULL) {
|
||||||
res = -errno;
|
res = -errno;
|
||||||
goto clean_object;
|
goto clean_object;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue