audioconvert: don't unroll when unaligned write pointer

We require the write pointer to be a multiple of 4 for our unrolled SSE
loop to work, so enforce this to avoid segfaults.
This commit is contained in:
Wim Taymans 2024-10-23 11:40:34 +02:00
parent da86026b7a
commit 3309e0b244

View file

@ -287,7 +287,8 @@ static inline void delay_convolve_run_sse(float *buffer, uint32_t *pos,
uint32_t n, unrolled;
if (SPA_IS_ALIGNED(src, 16) &&
SPA_IS_ALIGNED(dst, 16))
SPA_IS_ALIGNED(dst, 16) &&
(w & 3) == 0)
unrolled = n_samples & ~3;
else
unrolled = 0;