mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
filter-graph: fix index off by one in dsp_delay_c
Checking w + 1 > n_buffer means that w will go to n_buffer, which in turn leads to reading buffer[2 * n_buffer].
This commit is contained in:
parent
5b436abef7
commit
fc3a199ca2
1 changed files with 1 additions and 1 deletions
|
|
@ -218,7 +218,7 @@ void dsp_delay_c(void *obj, float *buffer, uint32_t *pos, uint32_t n_buffer,
|
|||
for (i = 0; i < n_samples; i++) {
|
||||
buffer[w] = buffer[w + n_buffer] = src[i];
|
||||
dst[i] = buffer[w + o];
|
||||
w = w + 1 > n_buffer ? 0 : w + 1;
|
||||
w = w + 1 >= n_buffer ? 0 : w + 1;
|
||||
}
|
||||
*pos = w;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue