lavfi: do not segfault on NULL passed to avfilter_get_by_name()
authorAnton Khirnov <anton@khirnov.net>
Sun, 7 Apr 2013 05:33:24 +0000 (07:33 +0200)
committerAnton Khirnov <anton@khirnov.net>
Thu, 11 Apr 2013 18:44:35 +0000 (20:44 +0200)
libavfilter/avfilter.c

index 199d8f9..8f028e1 100644 (file)
@@ -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;