]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Simplify
authorvitor <vitor@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 24 May 2008 20:42:16 +0000 (20:42 +0000)
committervitor <vitor@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 24 May 2008 20:42:16 +0000 (20:42 +0000)
Commited in SoC by Vitor Sessak on 2008-05-24 16:55:47

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13353 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavfilter/graphparser.c

index 14cd651af08dccb156359c064e8640bd91e0bef2..489fa2e61dcb4c3716b7144b960fb65c68cd9c27 100644 (file)
@@ -258,7 +258,6 @@ static int parse_inputs(const char **buf, AVFilterInOut **currInputs,
 
     while(**buf == '[') {
         char *name = parse_link_name(buf, log_ctx);
-        AVFilterInOut *link_to_add;
         AVFilterInOut *match;
 
         if(!name)
@@ -275,18 +274,15 @@ static int parse_inputs(const char **buf, AVFilterInOut **currInputs,
                        "Label \"%s\" appears twice as input!\n", match->name);
                 return -1;
             }
-
-            link_to_add = match;
         } else {
             /* Not in the list, so add it as an input */
-            link_to_add = av_mallocz(sizeof(AVFilterInOut));
-
-            link_to_add->name    = name;
-            link_to_add->type    = LinkTypeIn;
-            link_to_add->pad_idx = pad;
+            match = av_mallocz(sizeof(AVFilterInOut));
+            match->name    = name;
+            match->type    = LinkTypeIn;
+            match->pad_idx = pad;
         }
 
-        insert_inout(currInputs, link_to_add);
+        insert_inout(currInputs, match);
 
         *buf += consume_whitespace(*buf);
         pad++;