Commit 32ab3eaa authored by vitor's avatar vitor

Cosmetics: split setting a var and checking for error

Commited in SoC by Vitor Sessak on 2008-05-24 13:03:07


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13345 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 401b594e
...@@ -129,13 +129,16 @@ static AVFilterContext *create_filter(AVFilterGraph *ctx, int index, ...@@ -129,13 +129,16 @@ static AVFilterContext *create_filter(AVFilterGraph *ctx, int index,
snprintf(inst_name, sizeof(inst_name), "Parsed filter %d", index); snprintf(inst_name, sizeof(inst_name), "Parsed filter %d", index);
if(!(filterdef = avfilter_get_by_name(name))) { filterdef = avfilter_get_by_name(name);
if(!filterdef) {
av_log(log_ctx, AV_LOG_ERROR, av_log(log_ctx, AV_LOG_ERROR,
"no such filter: '%s'\n", name); "no such filter: '%s'\n", name);
return NULL; return NULL;
} }
if(!(filt = avfilter_open(filterdef, inst_name))) { filt = avfilter_open(filterdef, inst_name);
if(!filt) {
av_log(log_ctx, AV_LOG_ERROR, av_log(log_ctx, AV_LOG_ERROR,
"error creating filter '%s'\n", name); "error creating filter '%s'\n", name);
return NULL; return NULL;
...@@ -362,7 +365,9 @@ int avfilter_parse_graph(AVFilterGraph *graph, const char *filters, ...@@ -362,7 +365,9 @@ int avfilter_parse_graph(AVFilterGraph *graph, const char *filters,
if(pad < 0) if(pad < 0)
goto fail; goto fail;
if(!(filter = parse_filter(&filters, graph, index, log_ctx))) filter = parse_filter(&filters, graph, index, log_ctx);
if(!filter)
goto fail; goto fail;
if(filter->input_count == 1 && !currInputs && !index) { if(filter->input_count == 1 && !currInputs && !index) {
......
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