diff options
author | Max Kellermann <max@musicpd.org> | 2018-02-09 19:05:45 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-02-09 19:05:45 +0100 |
commit | e46fbd0780808835c75ada242b536f030459c8a6 (patch) | |
tree | 5d9128451465aaf80d888f62057a97505011cddb /src | |
parent | 56b74ad990d8d6180fe47fbb271469b2825d2d42 (diff) |
filter/convert: set the PcmConvert instance only if it was initialized
Fixes valgrind warning.
Diffstat (limited to 'src')
-rw-r--r-- | src/filter/plugins/ConvertFilterPlugin.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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<void> FilterPCM(ConstBuffer<void> src) override; |