mirror of https://github.com/mpv-player/mpv
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:
parent
2064fc2990
commit
2e16dfbf93
|
@ -680,9 +680,12 @@ struct af_instance *af_add(struct af_stream *s, char *name, char **args)
|
|||
return NULL;
|
||||
|
||||
// Reinitalize the filter list
|
||||
if (af_reinit(s) != AF_OK) {
|
||||
af_remove(s, new);
|
||||
if (af_reinit(s) != AF_OK) {
|
||||
af_uninit(s);
|
||||
af_init(s);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return new;
|
||||
|
|
Loading…
Reference in New Issue