From 9ce6828d7249c09e952b715a5cf17bd593d01062 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 29 Jan 2018 22:22:28 +0100 Subject: [PATCH] filter/convert: call PcmConvert::Flush() only if initialized Fixes another part of #208, the one which caused the bogus exception. --- src/filter/plugins/ConvertFilterPlugin.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/filter/plugins/ConvertFilterPlugin.cxx b/src/filter/plugins/ConvertFilterPlugin.cxx index 91d556746..77c82eea9 100644 --- a/src/filter/plugins/ConvertFilterPlugin.cxx +++ b/src/filter/plugins/ConvertFilterPlugin.cxx @@ -57,7 +57,9 @@ public: ConstBuffer FilterPCM(ConstBuffer src) override; ConstBuffer Flush() override { - return state.Flush(); + return IsActive() + ? state.Flush() + : nullptr; } private: