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.
This commit is contained in:
wm4 2014-10-02 01:20:01 +02:00
parent 2064fc2990
commit 2e16dfbf93
1 changed files with 5 additions and 2 deletions

View File

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