mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-20 08:56:56 -05:00
node: don't suspend when already suspended
This commit is contained in:
parent
5d12929153
commit
972b843851
1 changed files with 5 additions and 2 deletions
|
|
@ -158,8 +158,8 @@ static int pause_node(struct pw_impl_node *this)
|
||||||
struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this);
|
struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this);
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
pw_log_debug(NAME" %p: pause node state:%s", this,
|
pw_log_debug(NAME" %p: pause node state:%s pause-on-idle:%d", this,
|
||||||
pw_node_state_as_string(this->info.state));
|
pw_node_state_as_string(this->info.state), impl->pause_on_idle);
|
||||||
|
|
||||||
if (this->info.state <= PW_NODE_STATE_IDLE && impl->pause_on_idle)
|
if (this->info.state <= PW_NODE_STATE_IDLE && impl->pause_on_idle)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -327,6 +327,9 @@ static int suspend_node(struct pw_impl_node *this)
|
||||||
pw_log_debug(NAME" %p: suspend node state:%s", this,
|
pw_log_debug(NAME" %p: suspend node state:%s", this,
|
||||||
pw_node_state_as_string(this->info.state));
|
pw_node_state_as_string(this->info.state));
|
||||||
|
|
||||||
|
if (this->info.state <= PW_NODE_STATE_SUSPENDED)
|
||||||
|
return 0;
|
||||||
|
|
||||||
pause_node(this);
|
pause_node(this);
|
||||||
|
|
||||||
spa_list_for_each(p, &this->input_ports, link) {
|
spa_list_for_each(p, &this->input_ports, link) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue