Commit 134060c2 authored by vitor's avatar vitor

Check for error so that

avfilter_open(av_filter_get_by_name(...etc...)) fails 
gracefully.

Commited in SoC by Vitor Sessak on 2007-10-29 16:00:27


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12024 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b3017ad8
......@@ -363,7 +363,12 @@ static const char *filter_name(void *p)
AVFilterContext *avfilter_open(AVFilter *filter, char *inst_name)
{
AVFilterContext *ret = av_malloc(sizeof(AVFilterContext));
AVFilterContext *ret;
if (!filter)
return 0;
ret = av_malloc(sizeof(AVFilterContext));
ret->av_class = av_mallocz(sizeof(AVClass));
ret->av_class->item_name = filter_name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment