From a9bf93030e8c427a3479ccf79265f85953cf5586 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 13 Mar 2021 13:53:41 +0100 Subject: [PATCH] resample: limit input size to max size of empty space When flushing use the max size of the empty space, not the max size of the input buffers, which might be larger. --- spa/plugins/audioconvert/resample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/audioconvert/resample.c b/spa/plugins/audioconvert/resample.c index 1f8eee90e..18fcf9063 100644 --- a/spa/plugins/audioconvert/resample.c +++ b/spa/plugins/audioconvert/resample.c @@ -822,7 +822,7 @@ static int impl_node_process(void *object) dst_datas = alloca(sizeof(void*) * this->resample.channels); if (size == 0) { - size = sb->datas[0].maxsize; + size = MAX_SAMPLES * sizeof(float); for (i = 0; i < sb->n_datas; i++) src_datas[i] = SPA_PTR_ALIGN(this->empty, MAX_ALIGN, void); inport->offset = 0;