adapter: handle -ENOTSUP for commands

When using custom commands, the converter might return -ENOTSUP and
we should ignore this.
This commit is contained in:
Wim Taymans 2025-05-19 16:48:04 +02:00
parent 9207fea992
commit a968027bdc
2 changed files with 8 additions and 2 deletions

View file

@ -1045,7 +1045,10 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
break;
}
if ((res = spa_node_send_command(this->target, command)) < 0) {
res = spa_node_send_command(this->target, command);
if (res == -ENOTSUP)
res = 0;
if (res < 0) {
spa_log_error(this->log, "%p: can't send command %d: %s",
this, SPA_NODE_COMMAND_ID(command),
spa_strerror(res));

View file

@ -1012,7 +1012,10 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
break;
}
if ((res = spa_node_send_command(this->target, command)) < 0) {
res = spa_node_send_command(this->target, command);
if (res == -ENOTSUP)
res = 0;
if (res < 0) {
spa_log_error(this->log, "%p: can't send command %d: %s",
this, SPA_NODE_COMMAND_ID(command),
spa_strerror(res));