From e46fbd0780808835c75ada242b536f030459c8a6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 9 Feb 2018 19:05:45 +0100 Subject: [PATCH] filter/convert: set the PcmConvert instance only if it was initialized Fixes valgrind warning. --- src/filter/plugins/ConvertFilterPlugin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/filter/plugins/ConvertFilterPlugin.cxx b/src/filter/plugins/ConvertFilterPlugin.cxx index bcc70fcd5..cec95222b 100644 --- a/src/filter/plugins/ConvertFilterPlugin.cxx +++ b/src/filter/plugins/ConvertFilterPlugin.cxx @@ -53,7 +53,8 @@ public: void Set(const AudioFormat &_out_audio_format); void Reset() override { - state.Reset(); + if (IsActive()) + state.Reset(); } ConstBuffer FilterPCM(ConstBuffer src) override;