diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2023-11-05 08:59:26 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-11-08 20:26:23 +0100 |
commit | 5aa20682703b746cd21390c97985d0b1b3566e51 (patch) | |
tree | 225b2166840e8d57aa18efbcc4947f35b5593171 /audio/out | |
parent | 4a134f441d61f24bc1d041740a61ad2be652d17d (diff) | |
download | mpv-5aa20682703b746cd21390c97985d0b1b3566e51.tar.bz2 mpv-5aa20682703b746cd21390c97985d0b1b3566e51.tar.xz |
ao_pipewire: switch to ao_read_data_nonblocking()
Avoid blocking the process callback as it runs with realtime privileges.
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao_pipewire.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c index 657ea1b7ba..3fbcbf613d 100644 --- a/audio/out/ao_pipewire.c +++ b/audio/out/ao_pipewire.c @@ -181,7 +181,7 @@ static void on_process(void *userdata) end_time += (nframes * 1e9 / ao->samplerate) + ((double) time.delay * SPA_NSEC_PER_SEC * time.rate.num / time.rate.denom); - int samples = ao_read_data(ao, data, nframes, end_time); + int samples = ao_read_data_nonblocking(ao, data, nframes, end_time); b->size = samples; for (int i = 0; i < buf->n_datas; i++) { |