From a012b253359371f1a4e3dd9a8b66538bc9256c48 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 4 Jul 2016 15:17:03 +0200 Subject: [PATCH] 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 --- src/filter/plugins/ConvertFilterPlugin.cxx | 4 ++-- 1 file 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 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;