audioadapter: only accept PortConfig for the adapter direction

This commit is contained in:
Wim Taymans 2022-12-05 11:45:10 +01:00
parent 177479dfd1
commit 5bda4b6a57

View file

@ -604,6 +604,9 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
SPA_PARAM_PORT_CONFIG_format, SPA_POD_OPT_Pod(&format)) < 0) SPA_PARAM_PORT_CONFIG_format, SPA_POD_OPT_Pod(&format)) < 0)
return -EINVAL; return -EINVAL;
if (dir != this->direction)
return -EINVAL;
if (format) { if (format) {
struct spa_audio_info info; struct spa_audio_info info;
@ -642,7 +645,6 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
} }
break; break;
} }
case SPA_PARAM_Props: case SPA_PARAM_Props:
if (this->target != this->follower) if (this->target != this->follower)
res = spa_node_set_param(this->target, id, flags, param); res = spa_node_set_param(this->target, id, flags, param);