From 3fdeb64ddbf09ce96dc69e83565f0a86b50d345c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 24 May 2018 16:16:11 +0200 Subject: [PATCH] stream: only try to send again when needed We should only try to send data when the process call prepared new data for us and we didn't already have data. --- src/pipewire/stream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 03ec3d495..b8b1fb4d5 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -769,7 +769,8 @@ static int impl_node_process_output(struct spa_node *node) } else { if (!SPA_FLAG_CHECK(impl->flags, PW_STREAM_FLAG_DRIVER)) { call_process(impl); - if (spa_ringbuffer_get_read_index(&impl->queued.ring, &index) > 0) + if (spa_ringbuffer_get_read_index(&impl->queued.ring, &index) > 0 && + io->status == SPA_STATUS_NEED_BUFFER) goto again; } res = io->status;