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 b9a8bb15a4
commit b80189c3dd
2 changed files with 8 additions and 2 deletions

View file

@ -1058,7 +1058,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

@ -1109,7 +1109,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));