mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: a Flush command does not stop processing
A flush command is not supposed to stop playback but just clear the current state. Normally, to avoid complications, an application will Pause, Flush and optionally Start to do things smoothly without interfering with the process loop, but things should not crash if that's not the case. Fixes #2726
This commit is contained in:
parent
ed8be8e393
commit
2d858e0ba2
3 changed files with 9 additions and 9 deletions
|
|
@ -824,13 +824,13 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
case SPA_NODE_COMMAND_Suspend:
|
||||
configure_format(this, 0, NULL);
|
||||
SPA_FALLTHROUGH
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
this->io_buffers.status = SPA_STATUS_OK;
|
||||
SPA_FALLTHROUGH
|
||||
case SPA_NODE_COMMAND_Pause:
|
||||
this->started = false;
|
||||
spa_log_debug(this->log, "%p: stopped", this);
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
this->io_buffers.status = SPA_STATUS_OK;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1547,12 +1547,12 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
case SPA_NODE_COMMAND_Suspend:
|
||||
this->setup = false;
|
||||
SPA_FALLTHROUGH;
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
reset_node(this);
|
||||
SPA_FALLTHROUGH;
|
||||
case SPA_NODE_COMMAND_Pause:
|
||||
this->started = false;
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
reset_node(this);
|
||||
break;
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -823,12 +823,12 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
case SPA_NODE_COMMAND_Suspend:
|
||||
configure_format(this, 0, NULL);
|
||||
SPA_FALLTHROUGH
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
this->io_buffers.status = SPA_STATUS_OK;
|
||||
SPA_FALLTHROUGH
|
||||
case SPA_NODE_COMMAND_Pause:
|
||||
this->started = false;
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
this->io_buffers.status = SPA_STATUS_OK;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue