diff options
author | Max Kellermann <max@duempel.org> | 2013-11-04 07:59:15 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-11-04 08:00:00 +0100 |
commit | 2ce3900071f27f518de41048096ec4e419c4d627 (patch) | |
tree | c838cb7925fc461f73fa13f6b4ec0357de296d34 /src/filter | |
parent | bf2c1f3e9e6e1cb36d40fe0b49e18bd29e82ad4a (diff) | |
download | mpd-2ce3900071f27f518de41048096ec4e419c4d627.tar.gz mpd-2ce3900071f27f518de41048096ec4e419c4d627.tar.xz mpd-2ce3900071f27f518de41048096ec4e419c4d627.zip |
filter/AutoConvert: modify child_audio_format, not in_audio_format
This prevented using the "volume_normalization" feature with some
codecs (e.g. mp3), because the normalization code requires 16 bit
samples. If the codec happens to deliver formats other than S16, the
AutoConvert filter succeeds to initialize the conversion filter, but
the returned input audio format was wrong.
Diffstat (limited to 'src/filter')
-rw-r--r-- | src/filter/AutoConvertFilterPlugin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/filter/AutoConvertFilterPlugin.cxx b/src/filter/AutoConvertFilterPlugin.cxx index 4b5ebff4d..918a16e53 100644 --- a/src/filter/AutoConvertFilterPlugin.cxx +++ b/src/filter/AutoConvertFilterPlugin.cxx @@ -60,8 +60,8 @@ AutoConvertFilter::Open(AudioFormat &in_audio_format, Error &error) /* open the "real" filter */ - const AudioFormat child_audio_format = in_audio_format; - AudioFormat out_audio_format = filter->Open(in_audio_format, error); + AudioFormat child_audio_format = in_audio_format; + AudioFormat out_audio_format = filter->Open(child_audio_format, error); if (!out_audio_format.IsDefined()) return out_audio_format; |