[FFmpeg-cvslog] graphparser: simplify condition in avfilter_graph_parse()

Stefano Sabatini git at videolan.org
Sun Jul 10 18:09:18 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sat Jul  2 15:37:32 2011 +0200| [2420763638bef385c8116a44ff5c0d2c15589494] | committer: Stefano Sabatini

graphparser: simplify condition in avfilter_graph_parse()

Since avfilter_graph_parse() creates the "[in]" inout for the first
unlabelled input pad, it is expected that it will create an "[out]"
inout for last unlabelled output pad, even in the case where it cannot
find any open input pad with that name.

This change removes the check on the existence of an open input pad
named "out", so it simplifies the checked condition while implementing
a more intuitive behavior.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2420763638bef385c8116a44ff5c0d2c15589494
---

 libavfilter/avfilter.h    |    2 +-
 libavfilter/graphparser.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 226d7be..362bbfe 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -30,7 +30,7 @@
 
 #define LIBAVFILTER_VERSION_MAJOR  2
 #define LIBAVFILTER_VERSION_MINOR 24
-#define LIBAVFILTER_VERSION_MICRO  3
+#define LIBAVFILTER_VERSION_MICRO  4
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
                                                LIBAVFILTER_VERSION_MINOR, \
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 111e5aa..9db7a4d 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -389,7 +389,7 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
         goto end;
     }
 
-    if (open_inputs && !strcmp(open_inputs->name, "out") && curr_inputs) {
+    if (curr_inputs) {
         /* Last output pad, assume it is "[out]" if not specified */
         const char *tmp = "[out]";
         if ((ret = parse_outputs(&tmp, &curr_inputs, &open_inputs, &open_outputs,



More information about the ffmpeg-cvslog mailing list