summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-05-24 20:41:48 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-05-24 20:41:48 +0000
commit5e600185453e1a0ded70a59701f60a0022a88e42 (patch)
tree306a64fef51236556d18992fd386f21a2b65ee9d /libavfilter
parent69fa7e80c2efbc54be00fa69406cda706e582b50 (diff)
Cosmetics: split setting a var and checking for error
Commited in SoC by Vitor Sessak on 2008-05-24 13:03:07 Originally committed as revision 13345 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/graphparser.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index e74db2ad96..7067e4289a 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -129,13 +129,16 @@ static AVFilterContext *create_filter(AVFilterGraph *ctx, int 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,
"no such filter: '%s'\n", name);
return NULL;
}
- if(!(filt = avfilter_open(filterdef, inst_name))) {
+ filt = avfilter_open(filterdef, inst_name);
+ if(!filt) {
av_log(log_ctx, AV_LOG_ERROR,
"error creating filter '%s'\n", name);
return NULL;
@@ -362,7 +365,9 @@ int avfilter_parse_graph(AVFilterGraph *graph, const char *filters,
if(pad < 0)
goto fail;
- if(!(filter = parse_filter(&filters, graph, index, log_ctx)))
+ filter = parse_filter(&filters, graph, index, log_ctx);
+
+ if(!filter)
goto fail;
if(filter->input_count == 1 && !currInputs && !index) {