From 2e16dfbf93bd9348c4beb526b14f52b01af3e867 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 2 Oct 2014 01:20:01 +0200 Subject: audio/filter: don't wipe full filter chain if adding a filter fails There's no need for that, and in fact makes it more likely that it recovers normally. --- audio/filter/af.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/audio/filter/af.c b/audio/filter/af.c index 9227c9c036..72029f1013 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -681,8 +681,11 @@ struct af_instance *af_add(struct af_stream *s, char *name, char **args) // Reinitalize the filter list if (af_reinit(s) != AF_OK) { - af_uninit(s); - af_init(s); + af_remove(s, new); + if (af_reinit(s) != AF_OK) { + af_uninit(s); + af_init(s); + } return NULL; } return new; -- cgit v1.2.3