lavfi: do not segfault on NULL passed to avfilter_get_by_name()

This commit is contained in:
Anton Khirnov 2013-04-07 07:33:24 +02:00
parent fa2a34cd40
commit f160c6a18a
1 changed files with 3 additions and 0 deletions

View 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;