summaryrefslogtreecommitdiff
path: root/src/filter
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-07-04 15:17:03 +0200
committerMax Kellermann <max@duempel.org>2016-07-04 15:17:03 +0200
commita012b253359371f1a4e3dd9a8b66538bc9256c48 (patch)
treef64827c3f4a32d7baa48e689bc9b6ac0bce0abcd /src/filter
parent46e8b137e941f3b44b586181ada1088ffb219340 (diff)
filter/convert: fix no-op check
Commit 3a212412 changed the meaning of out_audio_format, but I forgot to apply this to ConvertFilter::FilterPCM(). See https://bugs.musicpd.org/view.php?id=4551
Diffstat (limited to 'src/filter')
-rw-r--r--src/filter/plugins/ConvertFilterPlugin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/filter/plugins/ConvertFilterPlugin.cxx b/src/filter/plugins/ConvertFilterPlugin.cxx
index b8a1b905d..51022843d 100644
--- a/src/filter/plugins/ConvertFilterPlugin.cxx
+++ b/src/filter/plugins/ConvertFilterPlugin.cxx
@@ -110,7 +110,7 @@ ConvertFilter::~ConvertFilter()
{
assert(in_audio_format.IsValid());
- if (out_audio_format.IsValid())
+ if (out_audio_format != in_audio_format)
state.Close();
}
@@ -119,7 +119,7 @@ ConvertFilter::FilterPCM(ConstBuffer<void> src, Error &error)
{
assert(in_audio_format.IsValid());
- if (!out_audio_format.IsValid())
+ if (out_audio_format == in_audio_format)
/* optimized special case: no-op */
return src;