From 056514d598ed6f7ec495c9b5d4db84bfc60243da Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 31 Oct 2021 16:33:15 +0100 Subject: [PATCH] output/snapcast: reset unflushed_input after successful read With the "wave" encoder, this has no effect, but it's more correct. --- src/output/plugins/snapcast/SnapcastOutputPlugin.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/output/plugins/snapcast/SnapcastOutputPlugin.cxx b/src/output/plugins/snapcast/SnapcastOutputPlugin.cxx index 73778e6b8..1970988f7 100644 --- a/src/output/plugins/snapcast/SnapcastOutputPlugin.cxx +++ b/src/output/plugins/snapcast/SnapcastOutputPlugin.cxx @@ -342,6 +342,8 @@ SnapcastOutput::Play(const void *chunk, size_t size) if (nbytes == 0) break; + unflushed_input = 0; + const std::lock_guard protect(mutex); if (chunks.empty()) inject_event.Schedule();