Skip to content

Commit e5486b9

Browse files
dengbo11sfan5
authored andcommitted
ao_pipewire: treat init timeout as failure instead of success
When wait_for_init_done times out, init_state remains INIT_STATE_NONE. The original check only handled INIT_STATE_ERROR, allowing init() to return 0 (success) even though the stream was never properly initialized. This could lead to an infinite reload loop when the partially initialized stream later enters an error state. Fix by checking for INIT_STATE_SUCCESS instead of INIT_STATE_ERROR, so that any state other than SUCCESS (including NONE due to timeout) is correctly treated as a failure.
1 parent 115b87b commit e5486b9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

audio/out/ao_pipewire.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ static int init(struct ao *ao)
668668

669669
pw_thread_loop_unlock(p->loop);
670670

671-
if (p->init_state == INIT_STATE_ERROR)
671+
if (p->init_state != INIT_STATE_SUCCESS)
672672
goto error;
673673

674674
return 0;

0 commit comments

Comments
 (0)