mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
node: check if active when ready event is emited
Add a check that the node is actually started when we get the ready callback.
This commit is contained in:
parent
3d3851e5a3
commit
2c4e1b8537
2 changed files with 12 additions and 2 deletions
|
|
@ -1155,6 +1155,11 @@ static int follower_ready(void *data, int status)
|
||||||
|
|
||||||
spa_log_trace_fp(this->log, "%p: ready %d", this, status);
|
spa_log_trace_fp(this->log, "%p: ready %d", this, status);
|
||||||
|
|
||||||
|
if (!this->started) {
|
||||||
|
spa_log_warn(this->log, "%p: ready stopped node", this);
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
if (this->target != this->follower) {
|
if (this->target != this->follower) {
|
||||||
this->driver = true;
|
this->driver = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1624,8 +1624,13 @@ static int node_ready(void *data, int status)
|
||||||
struct pw_node_target *t;
|
struct pw_node_target *t;
|
||||||
struct pw_impl_port *p;
|
struct pw_impl_port *p;
|
||||||
|
|
||||||
pw_log_trace_fp("%p: ready driver:%d exported:%d %p status:%d", node,
|
pw_log_trace_fp("%p: ready driver:%d exported:%d %p status:%d added:%d", node,
|
||||||
node->driver, node->exported, driver, status);
|
node->driver, node->exported, driver, status, node->added);
|
||||||
|
|
||||||
|
if (!node->added) {
|
||||||
|
pw_log_warn("%p: ready non-active node", node);
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
if (SPA_UNLIKELY(node == driver)) {
|
if (SPA_UNLIKELY(node == driver)) {
|
||||||
struct pw_node_activation *a = node->rt.activation;
|
struct pw_node_activation *a = node->rt.activation;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue