stream: make empty objects remove the PARAM

Make sure that NULL params don't cause -EINVAL but ignore them.

Don't add empty param objects. this makes it possible to clear all previous
params by setting an empty object.
This commit is contained in:
Wim Taymans 2023-12-11 13:01:10 +01:00
parent 971bc8a249
commit 283c215641
3 changed files with 27 additions and 22 deletions

View file

@ -437,6 +437,14 @@ static inline int spa_pod_object_is_fixated(const struct spa_pod_object *pod)
return 1;
}
static inline int spa_pod_object_has_props(const struct spa_pod_object *pod)
{
struct spa_pod_prop *res;
SPA_POD_OBJECT_FOREACH(pod, res)
return 1;
return 0;
}
static inline int spa_pod_is_fixated(const struct spa_pod *pod)
{
if (!spa_pod_is_object(pod))