Make sure we don't set the pipewire state to running if there was an error during startup

This commit is contained in:
Sam Lantinga 2022-12-06 10:37:55 -08:00
parent 212638e9d0
commit 5038f50f10

View file

@ -581,7 +581,6 @@ static void run_pipewire(struct pipewire_state *state)
},
};
state->running = true;
while (state->running) {
int ret = poll(pollfds, EVENT_COUNT, -1);
if (ret < 0) {
@ -674,6 +673,7 @@ bool init_pipewire(void)
return false;
}
state->running = true;
while (state->stream_node_id == SPA_ID_INVALID) {
int ret = pw_loop_iterate(state->loop, -1);
if (ret < 0) {