From 2420763638bef385c8116a44ff5c0d2c15589494 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 2 Jul 2011 15:37:32 +0200 Subject: 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. --- libavfilter/avfilter.h | 2 +- libavfilter/graphparser.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libavfilter') diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 226d7beacb..362bbfe2e5 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 111e5aa0db..9db7a4df94 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, -- cgit v1.2.3