mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
adapter: use the right default when filtering default
We should prefer the value of the follower when fixating to the PortConfig format. To make this actually work we need to be able to check if the value is within the configured ranges. Implement the check for all types by simply comparing the memory. This should then work also for checking arrays, such as channel positions.
This commit is contained in:
parent
a5e63102d9
commit
38a3ebdca1
3 changed files with 3 additions and 5 deletions
|
|
@ -927,7 +927,7 @@ static struct spa_pod *merge_objects(struct impl *this, struct spa_pod_builder *
|
|||
p2 = spa_pod_object_find_prop(o2, p2, p1->key);
|
||||
if (p2 != NULL) {
|
||||
spa_pod_builder_get_state(b, &state);
|
||||
res = spa_pod_filter_prop(b, p1, p2);
|
||||
res = spa_pod_filter_prop(b, p2, p1);
|
||||
if (res < 0)
|
||||
spa_pod_builder_reset(b, &state);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -978,7 +978,7 @@ static struct spa_pod *merge_objects(struct impl *this, struct spa_pod_builder *
|
|||
p2 = spa_pod_object_find_prop(o2, p2, p1->key);
|
||||
if (p2 != NULL) {
|
||||
spa_pod_builder_get_state(b, &state);
|
||||
res = spa_pod_filter_prop(b, p1, p2);
|
||||
res = spa_pod_filter_prop(b, p2, p1);
|
||||
if (res < 0)
|
||||
spa_pod_builder_reset(b, &state);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue