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:
Wim Taymans 2025-06-03 11:31:07 +02:00
parent a5e63102d9
commit 38a3ebdca1
3 changed files with 3 additions and 5 deletions

View file

@ -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);
}

View file

@ -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);
}