Commit 755b6bdfd5 for ffmpeg
commit 755b6bdfd5a9d2bbf94434b9c3e7608364355e37
Author: Kacper Michajłow <kasper93@gmail.com>
Date: Wed Sep 23 20:39:09 2026 +0200
swresample/tests/swresample: align the sample buffers
They are plain byte arrays on the stack but are read and written as
samples of up to double size.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
diff --git a/libswresample/tests/swresample.c b/libswresample/tests/swresample.c
index 965b2d3002..8ee35e1e21 100644
--- a/libswresample/tests/swresample.c
+++ b/libswresample/tests/swresample.c
@@ -22,6 +22,7 @@
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
+#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "libswresample/swresample.h"
@@ -222,9 +223,9 @@ int main(int argc, char **argv){
int in_sample_rate, out_sample_rate, ch ,i, flush_count;
AVChannelLayout in_ch_layout = { 0 }, out_ch_layout = { 0 };
enum AVSampleFormat in_sample_fmt, out_sample_fmt;
- uint8_t array_in[SAMPLES*8*8];
- uint8_t array_mid[SAMPLES*8*8*3];
- uint8_t array_out[SAMPLES*8*8+100];
+ LOCAL_ALIGNED(32, uint8_t, array_in, [SAMPLES*8*8]);
+ LOCAL_ALIGNED(32, uint8_t, array_mid, [SAMPLES*8*8*3]);
+ LOCAL_ALIGNED(32, uint8_t, array_out, [SAMPLES*8*8+100]);
uint8_t *ain[SWR_CH_MAX];
uint8_t *aout[SWR_CH_MAX];
uint8_t *amid[SWR_CH_MAX];