diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2022-08-17 13:14:30 +0200 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2022-08-17 15:48:12 -0700 |
commit | dbfee1be3d6da98d11517e1d166216c715720711 (patch) | |
tree | 4ddc08eb69bf5da294631e7713eacb4309281766 | |
parent | 0638a91ff4dfbec2b3e1db0375af068ef2e7b855 (diff) | |
download | mpv-dbfee1be3d6da98d11517e1d166216c715720711.tar.bz2 mpv-dbfee1be3d6da98d11517e1d166216c715720711.tar.xz |
ao_pipewire: only try to read requested data
-rw-r--r-- | audio/out/ao_pipewire.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c index a54a4c828c..b1fb395924 100644 --- a/audio/out/ao_pipewire.c +++ b/audio/out/ao_pipewire.c @@ -131,6 +131,10 @@ static void on_process(void *userdata) int bytes_per_channel = buf->datas[0].maxsize / ao->channels.num; int nframes = bytes_per_channel / ao->sstride; +#if PW_CHECK_VERSION(0, 3, 49) + if (b->requested != 0) + nframes = b->requested; +#endif for (int i = 0; i < buf->n_datas; i++) { data[i] = buf->datas[i].data; |