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.
This commit is contained in:
Wim Taymans 2021-03-13 13:53:41 +01:00
parent 801bd98233
commit a9bf93030e

View file

@ -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;