filter/convert: set the PcmConvert instance only if it was initialized

Fixes valgrind warning.
This commit is contained in:
Max Kellermann 2018-02-09 19:05:45 +01:00
parent 56b74ad990
commit e46fbd0780

View File

@ -53,7 +53,8 @@ public:
void Set(const AudioFormat &_out_audio_format); void Set(const AudioFormat &_out_audio_format);
void Reset() override { void Reset() override {
state.Reset(); if (IsActive())
state.Reset();
} }
ConstBuffer<void> FilterPCM(ConstBuffer<void> src) override; ConstBuffer<void> FilterPCM(ConstBuffer<void> src) override;