mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
spa: respect mandatory properties while filtering
This commit is contained in:
parent
da566c2865
commit
d735d32eb3
1 changed files with 6 additions and 1 deletions
|
|
@ -301,6 +301,8 @@ static inline int spa_pod_filter_part(struct spa_pod_builder *b,
|
|||
p2 = spa_pod_object_find_prop(of, p2, p1->key);
|
||||
if (p2 != NULL)
|
||||
res = spa_pod_filter_prop(b, p1, p2);
|
||||
else if ((p1->flags & SPA_POD_PROP_FLAG_MANDATORY) != 0)
|
||||
res = -EINVAL;
|
||||
else
|
||||
spa_pod_builder_raw_padded(b, p1, SPA_POD_PROP_SIZE(p1));
|
||||
if (res < 0)
|
||||
|
|
@ -312,7 +314,10 @@ static inline int spa_pod_filter_part(struct spa_pod_builder *b,
|
|||
p1 = spa_pod_object_find_prop(op, p1, p2->key);
|
||||
if (p1 != NULL)
|
||||
continue;
|
||||
|
||||
if ((p2->flags & SPA_POD_PROP_FLAG_MANDATORY) != 0)
|
||||
res = -EINVAL;
|
||||
if (res < 0)
|
||||
break;
|
||||
spa_pod_builder_raw_padded(b, p2, SPA_POD_PROP_SIZE(p2));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue