af: avoid rebuilding filter chain in another minor case

No need to create additional noise of we can trivially see that
rebuiding the chain won't change anything.
This commit is contained in:
wm4 2016-07-15 13:03:57 +02:00
parent 48f9ea7104
commit f29bba1123
1 changed files with 3 additions and 0 deletions

View File

@ -366,6 +366,9 @@ static int af_find_output_conversion(struct af_stream *s, struct mp_audio *cfg)
!mp_chmap_equals_reordered(&af->fmt_in.channels, &af->fmt_out.channels))
return AF_ERROR;
}
// And not if it's the only filter.
if (conv->prev == s->first && conv->next == s->last)
return AF_ERROR;
*cfg = s->output;
return AF_OK;