mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
Jack: Fix jack_remove_property(ies) to use proxy id
These functions were using the object serial as the object id
This commit is contained in:
parent
0bc42d71e0
commit
9cb234dda9
1 changed files with 20 additions and 8 deletions
|
|
@ -324,7 +324,8 @@ SPA_EXPORT
|
||||||
int jack_remove_property (jack_client_t* client, jack_uuid_t subject, const char* key)
|
int jack_remove_property (jack_client_t* client, jack_uuid_t subject, const char* key)
|
||||||
{
|
{
|
||||||
struct client *c = (struct client *) client;
|
struct client *c = (struct client *) client;
|
||||||
uint32_t id;
|
struct object *o;
|
||||||
|
uint32_t serial;
|
||||||
int res = -1;
|
int res = -1;
|
||||||
|
|
||||||
spa_return_val_if_fail(c != NULL, -EINVAL);
|
spa_return_val_if_fail(c != NULL, -EINVAL);
|
||||||
|
|
@ -335,11 +336,16 @@ int jack_remove_property (jack_client_t* client, jack_uuid_t subject, const char
|
||||||
if (c->metadata == NULL)
|
if (c->metadata == NULL)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
id = jack_uuid_to_index(subject);
|
if (subject & (1<<30))
|
||||||
|
goto done;
|
||||||
|
|
||||||
pw_log_info("remove id:%u (%"PRIu64") '%s'", id, subject, key);
|
serial = jack_uuid_to_index(subject);
|
||||||
|
if ((o = find_by_serial(c, serial)) == NULL)
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
pw_log_info("remove id:%u (%"PRIu64") '%s'", o->id, subject, key);
|
||||||
pw_metadata_set_property(c->metadata->proxy,
|
pw_metadata_set_property(c->metadata->proxy,
|
||||||
id, key, NULL, NULL);
|
o->id, key, NULL, NULL);
|
||||||
res = do_sync(c);
|
res = do_sync(c);
|
||||||
done:
|
done:
|
||||||
pw_thread_loop_unlock(c->context.loop);
|
pw_thread_loop_unlock(c->context.loop);
|
||||||
|
|
@ -351,7 +357,8 @@ SPA_EXPORT
|
||||||
int jack_remove_properties (jack_client_t* client, jack_uuid_t subject)
|
int jack_remove_properties (jack_client_t* client, jack_uuid_t subject)
|
||||||
{
|
{
|
||||||
struct client *c = (struct client *) client;
|
struct client *c = (struct client *) client;
|
||||||
uint32_t id;
|
struct object *o;
|
||||||
|
uint32_t serial;
|
||||||
int res = -1;
|
int res = -1;
|
||||||
|
|
||||||
spa_return_val_if_fail(c != NULL, -EINVAL);
|
spa_return_val_if_fail(c != NULL, -EINVAL);
|
||||||
|
|
@ -360,11 +367,16 @@ int jack_remove_properties (jack_client_t* client, jack_uuid_t subject)
|
||||||
if (c->metadata == NULL)
|
if (c->metadata == NULL)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
id = jack_uuid_to_index(subject);
|
if (subject & (1<<30))
|
||||||
|
goto done;
|
||||||
|
|
||||||
pw_log_info("remove id:%u (%"PRIu64")", id, subject);
|
serial = jack_uuid_to_index(subject);
|
||||||
|
if ((o = find_by_serial(c, serial)) == NULL)
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
pw_log_info("remove id:%u (%"PRIu64")", o->id, subject);
|
||||||
pw_metadata_set_property(c->metadata->proxy,
|
pw_metadata_set_property(c->metadata->proxy,
|
||||||
id, NULL, NULL, NULL);
|
o->id, NULL, NULL, NULL);
|
||||||
res = do_sync(c);
|
res = do_sync(c);
|
||||||
done:
|
done:
|
||||||
pw_thread_loop_unlock(c->context.loop);
|
pw_thread_loop_unlock(c->context.loop);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue