diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-04-07 07:33:24 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-04-11 20:44:35 +0200 |
commit | f160c6a18a574b4c7d063e0a748037cbbd9912ee (patch) | |
tree | 23e271f8ad0d006a231d3c7a5d3dcf9071694554 | |
parent | fa2a34cd40d124161c748bb0f430dc63c94dd0da (diff) | |
download | ffmpeg-f160c6a18a574b4c7d063e0a748037cbbd9912ee.tar.gz |
lavfi: do not segfault on NULL passed to avfilter_get_by_name()
-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; |