mirror of https://github.com/mpv-player/mpv
ao_pipewire: only try to read requested data
This commit is contained in:
parent
0638a91ff4
commit
dbfee1be3d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue