summaryrefslogtreecommitdiffstats
path: root/filters/f_lavfi.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-12-07 14:19:11 +0100
committerwm4 <wm4@nowhere>2019-12-07 14:19:11 +0100
commit855a4779ae64a53d04a7d8fcdc274bd8f2155831 (patch)
tree6591561f3b7e3933227608a712ccde4227a3622d /filters/f_lavfi.c
parentd90d5ee1a0914239ee3048fe567fed14adbe1127 (diff)
downloadmpv-855a4779ae64a53d04a7d8fcdc274bd8f2155831.tar.bz2
mpv-855a4779ae64a53d04a7d8fcdc274bd8f2155831.tar.xz
filters: move prefix check from f_lavfi.c to user_filters.c
It's user_filters.c which allows the "lavfi-" prefix to distinguish libavfilter filters from mpv builtin filters. f_lavfi.c is a layer below, and strictly passes anything it gets to libavfilter. So the correct place for this is in user_filters.c, which also has the code for stripping the prefix in the normal filter instantiation code.
Diffstat (limited to 'filters/f_lavfi.c')
-rw-r--r--filters/f_lavfi.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/filters/f_lavfi.c b/filters/f_lavfi.c
index f4f68ba0af..23af326c9b 100644
--- a/filters/f_lavfi.c
+++ b/filters/f_lavfi.c
@@ -943,10 +943,6 @@ 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);
}