From 02d8d4e3efdc0297e9a7395b53d5b5893be4dd52 Mon Sep 17 00:00:00 2001 From: ekisu Date: Fri, 6 Dec 2019 15:00:34 -0300 Subject: f_lavfi: mp_lavfi_is_usable: check for "lavfi-" prefix Without this, adding filters with the prefix would fail, and some filters that have conflicting names with mpv ones were unusable. --- filters/f_lavfi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/filters/f_lavfi.c b/filters/f_lavfi.c index 23af326c9b..f4f68ba0af 100644 --- a/filters/f_lavfi.c +++ b/filters/f_lavfi.c @@ -943,6 +943,10 @@ static bool is_usable(const AVFilter *filter, int media_type) bool mp_lavfi_is_usable(const char *name, int media_type) { + // Skip the lavfi- prefix, if present. + if (strncmp(name, "lavfi-", 6) == 0) + name += 6; + const AVFilter *f = avfilter_get_by_name(name); return f && is_usable(f, media_type); } -- cgit v1.2.3