diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-04-07 09:33:24 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-04-11 22:44:35 +0400 |
commit | f160c6a18a574b4c7d063e0a748037cbbd9912ee (patch) | |
tree | 23e271f8ad0d006a231d3c7a5d3dcf9071694554 /libavfilter | |
parent | fa2a34cd40d124161c748bb0f430dc63c94dd0da (diff) |
lavfi: do not segfault on NULL passed to avfilter_get_by_name()
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfilter.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 199d8f97fc..8f028e1122 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -273,6 +273,9 @@ AVFilter *avfilter_get_by_name(const char *name) { AVFilter *f = NULL; + if (!name) + return NULL; + while ((f = avfilter_next(f))) if (!strcmp(f->name, name)) return f; |