Skip to content

ao/pulse: fix ao_drain hang when underrun makes buf_diff negative#17652

Open
dengzhongyuan365-dev wants to merge 1 commit intompv-player:masterfrom
dengzhongyuan365-dev:master
Open

ao/pulse: fix ao_drain hang when underrun makes buf_diff negative#17652
dengzhongyuan365-dev wants to merge 1 commit intompv-player:masterfrom
dengzhongyuan365-dev:master

Conversation

@dengzhongyuan365-dev
Copy link
Copy Markdown

@dengzhongyuan365-dev dengzhongyuan365-dev commented Mar 26, 2026

With prebuf=0, on underrun read_index overtakes write_index, making
buf_diff negative. Passing it to pa_bytes_to_usec() (uint64_t) overflows
and causes ao_drain() to hang forever via an infinite mp_cond_timedwait().

Fixes: 17651

With prebuf=0, on underrun read_index overtakes write_index, making
buf_diff negative. Passing it to pa_bytes_to_usec() (uint64_t) overflows
and causes ao_drain() to hang forever via an infinite mp_cond_timedwait().

Fixes: 17651
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.

2 participants