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:
Wim Taymans 2022-09-26 11:10:02 +02:00
parent ed8be8e393
commit 2d858e0ba2
3 changed files with 9 additions and 9 deletions

View file

@ -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;
}