Skip to content

ao_pipewire: treat init timeout as failure instead of success - #18247

Merged
sfan5 merged 1 commit into
mpv-player:masterfrom
dengbo11:fix-pipewire-init
Jul 9, 2026
Merged

ao_pipewire: treat init timeout as failure instead of success#18247
sfan5 merged 1 commit into
mpv-player:masterfrom
dengbo11:fix-pipewire-init

Conversation

@dengbo11

@dengbo11 dengbo11 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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.

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.
@sfan5
sfan5 merged commit e5486b9 into mpv-player:master Jul 9, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants