mirror of https://github.com/mpv-player/mpv
ao_pipewire: make sure not to exceed the available buffer
The error description in #10545 could indicate that we are overflowing we are corrupting the buffer metadata ourselves through out-of-bound writes. This check is also present in pw-cat so it seems to be expected for b->requested to exceed the actual available buffer space. Potential fix for #10545
This commit is contained in:
parent
bf5c19e05b
commit
6c1f01d284
|
@ -133,7 +133,7 @@ static void on_process(void *userdata)
|
|||
int nframes = bytes_per_channel / ao->sstride;
|
||||
#if PW_CHECK_VERSION(0, 3, 49)
|
||||
if (b->requested != 0)
|
||||
nframes = b->requested;
|
||||
nframes = MPMIN(b->requested, nframes);
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < buf->n_datas; i++)
|
||||
|
|
Loading…
Reference in New Issue