summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-07-15 13:03:57 +0200
committerwm4 <wm4@nowhere>2016-07-15 13:04:17 +0200
commitf29bba1123687c3eb601dd0df18d88a3b8a9fb82 (patch)
tree0524b9407b61b45638bb6cdc7474718541e5eed8 /audio
parent48f9ea71043d283fb3a43d9bc5f37ae03b59b0bb (diff)
downloadmpv-f29bba1123687c3eb601dd0df18d88a3b8a9fb82.tar.bz2
mpv-f29bba1123687c3eb601dd0df18d88a3b8a9fb82.tar.xz
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.
Diffstat (limited to 'audio')
-rw-r--r--audio/filter/af.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c
index 8d1ce889c4..d74e912500 100644
--- a/audio/filter/af.c
+++ b/audio/filter/af.c
@@ -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;