From 4aa80c7a711efac97791463c3d8a6a63ff542c79 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 17 Jun 2021 18:34:01 +0200 Subject: [PATCH] splitter: we always produce output Always set the HAVE_OUTPUT flag because we always consume the input and produce output, either to a buffer or an error. This makes sure processing never stalls when something is wrong on the output side. See #1305 --- spa/plugins/audioconvert/splitter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spa/plugins/audioconvert/splitter.c b/spa/plugins/audioconvert/splitter.c index 82b4088a5..bb9c2e7c8 100644 --- a/spa/plugins/audioconvert/splitter.c +++ b/spa/plugins/audioconvert/splitter.c @@ -1009,10 +1009,8 @@ static int impl_node_process(void *object) spa_log_trace_fp(this->log, NAME " %p: %d %p %d %d %d", this, i, outio, outio->status, outio->buffer_id, outport->stride); - if (SPA_UNLIKELY(outio->status == SPA_STATUS_HAVE_DATA)) { - res |= SPA_STATUS_HAVE_DATA; + if (SPA_UNLIKELY(outio->status == SPA_STATUS_HAVE_DATA)) goto empty; - } if (SPA_LIKELY(outio->buffer_id < outport->n_buffers)) { queue_buffer(this, outport, outio->buffer_id); @@ -1042,7 +1040,6 @@ static int impl_node_process(void *object) outio->status = SPA_STATUS_HAVE_DATA; outio->buffer_id = dbuf->id; - res |= SPA_STATUS_HAVE_DATA; } spa_log_trace_fp(this->log, NAME " %p: n_src:%d n_dst:%d n_samples:%d max:%d stride:%d p:%d", this, @@ -1054,6 +1051,7 @@ static int impl_node_process(void *object) inio->status = SPA_STATUS_NEED_DATA; res |= SPA_STATUS_NEED_DATA; + res |= SPA_STATUS_HAVE_DATA; return res; }