mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-11 13:30:07 -05:00
node: warn when _set_io fails on the node
This commit is contained in:
parent
550a2af044
commit
bad9b15a92
1 changed files with 9 additions and 4 deletions
|
|
@ -521,6 +521,7 @@ do_move_nodes(struct spa_loop *loop,
|
|||
struct pw_node *this = &src->this;
|
||||
struct impl *dst = *(struct impl **)data;
|
||||
struct spa_graph_node *n, *t;
|
||||
int res;
|
||||
|
||||
pw_log_trace("node %p: root %p driver:%p->%p", this,
|
||||
&this->rt.root, &src->driver_graph, &dst->driver_graph);
|
||||
|
|
@ -530,11 +531,15 @@ do_move_nodes(struct spa_loop *loop,
|
|||
spa_graph_node_add(&dst->driver_graph, &this->rt.root);
|
||||
}
|
||||
|
||||
if (this->node && spa_node_set_io(this->node,
|
||||
if (this->node) {
|
||||
if ((res = spa_node_set_io(this->node,
|
||||
SPA_IO_Position,
|
||||
&dst->position, sizeof(struct spa_io_position)) >= 0) {
|
||||
pw_log_debug("node %p: set position %p", this, &dst->position);
|
||||
this->rt.position = &dst->position;
|
||||
&dst->position, sizeof(struct spa_io_position))) < 0) {
|
||||
pw_log_warn("node %p: set position %s", this, spa_strerror(res));
|
||||
} else {
|
||||
pw_log_debug("node %p: set position %p", this, &dst->position);
|
||||
this->rt.position = &dst->position;
|
||||
}
|
||||
}
|
||||
|
||||
if (&src->driver_graph == &dst->driver_graph)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue