Looks like some versions of pw_stream_flush() crash if the stream was

never connected. If we can't connect, let's destroy the stream
immediately to avoid this from happening later when the plugin cleans
up.
This commit is contained in:
casey langen 2021-10-17 14:39:25 -07:00
parent eacb0ea034
commit 51275f35ba

View File

@ -404,6 +404,10 @@ bool PipeWireOut::StartPipeWire(IBuffer* buffer) {
}
cleanup:
if (this->pwStream) {
pw_stream_destroy(this->pwStream);
this->pwStream = nullptr;
}
pw_thread_loop_unlock(this->pwThreadLoop);
::debug->Error(TAG, "stream not initialized");
this->StopPipeWire();