*: rely on checks now done by spa_pod_get_values()

Rely on spa_pod_get_values() to return no values if the size is too
small for the type.  This means that if there is a check that at least
one value is returned, checking that the size is large enough is
unnecessary.
This commit is contained in:
Demi Marie Obenour 2025-07-25 16:54:20 -04:00
parent 42098fd8c1
commit 5853e1150b
5 changed files with 7 additions and 13 deletions

View file

@ -1209,10 +1209,7 @@ static struct spa_pod *transform_format(struct impl *this, struct port *port, co
uint32_t n_vals, choice, *id_vals;
struct spa_pod *val = spa_pod_get_values(&prop->value, &n_vals, &choice);
if (n_vals < 1)
return 0;
if (!spa_pod_is_id(val))
if (n_vals < 1 || val->type != SPA_TYPE_Id)
return 0;
id_vals = SPA_POD_BODY(val);