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:
parent
46e8b137e9
commit
a012b25335
@ -110,7 +110,7 @@ ConvertFilter::~ConvertFilter()
|
|||||||
{
|
{
|
||||||
assert(in_audio_format.IsValid());
|
assert(in_audio_format.IsValid());
|
||||||
|
|
||||||
if (out_audio_format.IsValid())
|
if (out_audio_format != in_audio_format)
|
||||||
state.Close();
|
state.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ ConvertFilter::FilterPCM(ConstBuffer<void> src, Error &error)
|
|||||||
{
|
{
|
||||||
assert(in_audio_format.IsValid());
|
assert(in_audio_format.IsValid());
|
||||||
|
|
||||||
if (!out_audio_format.IsValid())
|
if (out_audio_format == in_audio_format)
|
||||||
/* optimized special case: no-op */
|
/* optimized special case: no-op */
|
||||||
return src;
|
return src;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user