From f160c6a18a574b4c7d063e0a748037cbbd9912ee Mon Sep 17 00:00:00 2001
From: Anton Khirnov <anton@khirnov.net>
Date: Sun, 7 Apr 2013 07:33:24 +0200
Subject: [PATCH] lavfi: do not segfault on NULL passed to
 avfilter_get_by_name()

---
 libavfilter/avfilter.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 199d8f97fc4..8f028e1122f 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;
-- 
GitLab