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
This commit is contained in:
Max Kellermann 2016-07-04 15:17:03 +02:00
parent 46e8b137e9
commit a012b25335

View File

@ -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;