audioadapter: warn when scheduling a stopped node

Log a warning when we try to schedule a stopped node.

See #2701
This commit is contained in:
Wim Taymans 2022-09-23 11:30:42 +02:00
parent 104a75656e
commit ad8fa41678

View file

@ -813,6 +813,8 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
switch (SPA_NODE_COMMAND_ID(command)) {
case SPA_NODE_COMMAND_Start:
if (this->started)
return 0;
if ((res = negotiate_format(this)) < 0)
return res;
if ((res = negotiate_buffers(this)) < 0)
@ -1396,6 +1398,11 @@ static int impl_node_process(void *object)
struct impl *this = object;
int status = 0, fstatus, retry = 8;
if (!this->started) {
spa_log_warn(this->log, "%p: scheduling stopped node", this);
return -EIO;
}
spa_log_trace_fp(this->log, "%p: process convert:%p driver:%d",
this, this->convert, this->driver);