summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-01-06 12:44:55 +0100
committerMax Kellermann <max@musicpd.org>2017-01-06 12:44:55 +0100
commit1a9dfdfab8ac975c441e228ddace2adeb881cc8e (patch)
treea89a304c0d868f945cdee875f7d7287a0b77de75
parent5284cd11a9f73935aef096c145a75fa3ef90cde2 (diff)
filter/AutoConvert: initialize Filter::out_audio_format
-rw-r--r--NEWS1
-rw-r--r--src/filter/plugins/AutoConvertFilterPlugin.cxx3
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index da0031e68..b146b50cc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
ver 0.20.1 (not yet released)
+* fix crash with volume_normalization enabled
ver 0.20 (2017/01/04)
* protocol
diff --git a/src/filter/plugins/AutoConvertFilterPlugin.cxx b/src/filter/plugins/AutoConvertFilterPlugin.cxx
index f661c1093..7da31a00b 100644
--- a/src/filter/plugins/AutoConvertFilterPlugin.cxx
+++ b/src/filter/plugins/AutoConvertFilterPlugin.cxx
@@ -45,7 +45,8 @@ class AutoConvertFilter final : public Filter {
public:
AutoConvertFilter(std::unique_ptr<Filter> &&_filter,
std::unique_ptr<Filter> &&_convert)
- :filter(std::move(_filter)), convert(std::move(_convert)) {}
+ :Filter(_filter->GetOutAudioFormat()),
+ filter(std::move(_filter)), convert(std::move(_convert)) {}
ConstBuffer<void> FilterPCM(ConstBuffer<void> src) override;
};