From 4d8a2ea688eca58a7d32c887ededcaded54787ac Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 8 Nov 2024 18:50:11 +0100 Subject: [PATCH] output/Source: add assert(filter) --- src/output/Source.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/output/Source.cxx b/src/output/Source.cxx index 6b3f1642f..ed9bd6ff2 100644 --- a/src/output/Source.cxx +++ b/src/output/Source.cxx @@ -147,6 +147,8 @@ AudioOutputSource::GetChunkData(const MusicChunk &chunk, inline std::span AudioOutputSource::FilterChunk(const MusicChunk &chunk) { + assert(filter); + auto data = GetChunkData(chunk, replay_gain_filter.get(), &replay_gain_serial); if (data.empty()) @@ -197,6 +199,8 @@ AudioOutputSource::FilterChunk(const MusicChunk &chunk) bool AudioOutputSource::Fill(Mutex &mutex) { + assert(filter); + if (current_chunk != nullptr && pending_tag == nullptr && pending_data.empty()) DropCurrentChunk();