diff --git a/src/filter/plugins/AutoConvertFilterPlugin.cxx b/src/filter/plugins/AutoConvertFilterPlugin.cxx index 08302cc00..accce87f2 100644 --- a/src/filter/plugins/AutoConvertFilterPlugin.cxx +++ b/src/filter/plugins/AutoConvertFilterPlugin.cxx @@ -56,6 +56,7 @@ public: } ConstBuffer FilterPCM(ConstBuffer src) override; + ConstBuffer Flush() override; }; class PreparedAutoConvertFilter final : public PreparedFilter { @@ -104,6 +105,18 @@ AutoConvertFilter::FilterPCM(ConstBuffer src) return filter->FilterPCM(src); } +ConstBuffer +AutoConvertFilter::Flush() +{ + if (convert != nullptr) { + auto result = convert->Flush(); + if (!result.IsNull()) + return filter->FilterPCM(result); + } + + return filter->Flush(); +} + std::unique_ptr autoconvert_filter_new(std::unique_ptr filter) noexcept {