From ab1436fb3b880dbcb9ff709ac687d96e3545ccf4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 19 Jul 2023 21:39:25 +0200 Subject: [PATCH] audioconvert: improve EMPTY flag on output buffers Only set the EMPTY flag on output buffers if we don't have any previously queued samples and the input is EMPTY. Fixes #3365 --- spa/plugins/audioconvert/audioconvert.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c index 853b219ba..b5b318ded 100644 --- a/spa/plugins/audioconvert/audioconvert.c +++ b/spa/plugins/audioconvert/audioconvert.c @@ -2609,7 +2609,8 @@ static int impl_node_process(void *object) struct dir *dir; int tmp = 0, res = 0; bool in_passthrough, mix_passthrough, resample_passthrough, out_passthrough; - bool in_avail = false, flush_in = false, flush_out = false, draining = false, in_empty = true; + bool in_avail = false, flush_in = false, flush_out = false; + bool draining = false, in_empty = this->out_offset == 0; struct spa_io_buffers *io, *ctrlio = NULL; const struct spa_pod_sequence *ctrl = NULL;