mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-04 06:46:24 -04:00
*: more type checks for POD
Check that POD is correctly typed before using it.
This commit is contained in:
parent
a50b66651e
commit
c64a34d93f
20 changed files with 67 additions and 28 deletions
|
|
@ -232,15 +232,17 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
{
|
||||
struct props *p = &this->props;
|
||||
struct port *port = &this->port;
|
||||
int res;
|
||||
|
||||
if (param == NULL) {
|
||||
reset_props(p);
|
||||
return 0;
|
||||
}
|
||||
spa_pod_parse_object(param,
|
||||
if ((res = spa_pod_parse_object(param,
|
||||
SPA_TYPE_OBJECT_Props, NULL,
|
||||
SPA_PROP_live, SPA_POD_OPT_Bool(&p->live),
|
||||
SPA_PROP_patternType, SPA_POD_OPT_Int(&p->pattern));
|
||||
SPA_PROP_patternType, SPA_POD_OPT_Int(&p->pattern))) < 0)
|
||||
return res;
|
||||
|
||||
if (p->live)
|
||||
port->info.flags |= SPA_PORT_FLAG_LIVE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue