Commit 770cc9fe authored by vitor's avatar vitor

Move code out of if

Commited in SoC by Vitor Sessak on 2008-04-23 19:05:32


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13334 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 13cafca9
...@@ -196,12 +196,12 @@ static int link_filter_inouts(AVFilterContext *filter, ...@@ -196,12 +196,12 @@ static int link_filter_inouts(AVFilterContext *filter,
AVFilterInOut **currInputs, AVFilterInOut **currInputs,
AVFilterInOut **openLinks, AVClass *log_ctx) AVFilterInOut **openLinks, AVClass *log_ctx)
{ {
AVFilterInOut *p;
int pad = 0; int pad = 0;
pad = filter->input_count; pad = filter->input_count;
while(pad--) { while(pad--) {
p = *currInputs; AVFilterInOut *p= *currInputs;
*currInputs = (*currInputs)->next;
if(!p) { if(!p) {
av_log(log_ctx, AV_LOG_ERROR, av_log(log_ctx, AV_LOG_ERROR,
"Not enough inputs specified for the \"%s\" filter.\n", "Not enough inputs specified for the \"%s\" filter.\n",
...@@ -212,10 +212,8 @@ static int link_filter_inouts(AVFilterContext *filter, ...@@ -212,10 +212,8 @@ static int link_filter_inouts(AVFilterContext *filter,
if(p->filter) { if(p->filter) {
if(link_filter(p->filter, p->pad_idx, filter, pad, log_ctx)) if(link_filter(p->filter, p->pad_idx, filter, pad, log_ctx))
return -1; return -1;
*currInputs = (*currInputs)->next;
av_free(p); av_free(p);
} else { } else {
*currInputs = (*currInputs)->next;
p->filter = filter; p->filter = filter;
p->pad_idx = pad; p->pad_idx = pad;
p->next = *openLinks; p->next = *openLinks;
......
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