mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
parent
3c7699980f
commit
5804dd3f9b
1 changed files with 7 additions and 6 deletions
|
|
@ -387,7 +387,7 @@ static int do_replace(struct pw_properties *properties, const char *key, char *v
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
if (key == NULL || key[0] == 0)
|
if (key == NULL || key[0] == 0)
|
||||||
return 0;
|
goto exit_noupdate;
|
||||||
|
|
||||||
index = find_index(properties, key);
|
index = find_index(properties, key);
|
||||||
|
|
||||||
|
|
@ -399,11 +399,8 @@ static int do_replace(struct pw_properties *properties, const char *key, char *v
|
||||||
struct spa_dict_item *item =
|
struct spa_dict_item *item =
|
||||||
pw_array_get_unchecked(&impl->items, index, struct spa_dict_item);
|
pw_array_get_unchecked(&impl->items, index, struct spa_dict_item);
|
||||||
|
|
||||||
if (value && strcmp(item->value, value) == 0) {
|
if (value && strcmp(item->value, value) == 0)
|
||||||
if (!copy)
|
goto exit_noupdate;
|
||||||
free(value);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value == NULL) {
|
if (value == NULL) {
|
||||||
struct spa_dict_item *last = pw_array_get_unchecked(&impl->items,
|
struct spa_dict_item *last = pw_array_get_unchecked(&impl->items,
|
||||||
|
|
@ -420,6 +417,10 @@ static int do_replace(struct pw_properties *properties, const char *key, char *v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
exit_noupdate:
|
||||||
|
if (!copy)
|
||||||
|
free(value);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set a property value
|
/** Set a property value
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue