[FFmpeg-soc] [soc]: r2152 - libavfilter/graphparser.c

vitor subversion at mplayerhq.hu
Wed Apr 23 20:24:46 CEST 2008


Author: vitor
Date: Wed Apr 23 20:24:46 2008
New Revision: 2152

Log:
Replace if(acroread appli_Goethe.pdf &){B}else{C} by if(a){C}else{B}

Modified:
   libavfilter/graphparser.c

Modified: libavfilter/graphparser.c
==============================================================================
--- libavfilter/graphparser.c	(original)
+++ libavfilter/graphparser.c	Wed Apr 23 20:24:46 2008
@@ -286,17 +286,7 @@ static int parse_inputs(const char **buf
         /* First check if the label is not in the openLinks list */
         p = extract_inout(name, openLinks);
 
-        /* Not in the list, so add it as an input */
-        if(!p) {
-            AVFilterInOut *currlinkn = av_malloc(sizeof(AVFilterInOut));
-
-            currlinkn->name    = name;
-            currlinkn->type    = LinkTypeIn;
-            currlinkn->filter  = NULL;
-            currlinkn->pad_idx = pad;
-            currlinkn->next    = *currInputs;
-            *currInputs = currlinkn;
-        } else {
+        if(p) {
             /* A label of a open link. Make it one of the inputs of the next
                filter */
             AVFilterInOut *currlinkn = p;
@@ -307,6 +297,16 @@ static int parse_inputs(const char **buf
             }
             currlinkn->next = *currInputs;
             *currInputs = currlinkn;
+        } else {
+            /* Not in the list, so add it as an input */
+            AVFilterInOut *currlinkn = av_malloc(sizeof(AVFilterInOut));
+
+            currlinkn->name    = name;
+            currlinkn->type    = LinkTypeIn;
+            currlinkn->filter  = NULL;
+            currlinkn->pad_idx = pad;
+            currlinkn->next    = *currInputs;
+            *currInputs = currlinkn;
         }
         consume_whitespace(buf);
         pad++;
@@ -332,15 +332,7 @@ static int parse_outputs(const char **bu
         /* First check if the label is not in the openLinks list */
         match = extract_inout(name, openLinks);
 
-        /* Not in the list, so add the first input as a openLink */
-        if(!match) {
-            AVFilterInOut *p = *currInputs;
-            *currInputs = (*currInputs)->next;
-            p->next = *openLinks;
-            p->type = LinkTypeOut;
-            p->name = name;
-            *openLinks = p;
-        } else {
+        if(match) {
             /* A label of a open link. Link it. */
             AVFilterInOut *p = *currInputs;
             if (match->type != LinkTypeIn) {
@@ -355,6 +347,14 @@ static int parse_outputs(const char **bu
                 return -1;
             av_free(match);
             av_free(p);
+        } else {
+            /* Not in the list, so add the first input as a openLink */
+            AVFilterInOut *p = *currInputs;
+            *currInputs = (*currInputs)->next;
+            p->next = *openLinks;
+            p->type = LinkTypeOut;
+            p->name = name;
+            *openLinks = p;
         }
         consume_whitespace(buf);
         pad++;



More information about the FFmpeg-soc mailing list