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.
This commit is contained in:
Stefano Sabatini 2011-07-02 15:37:32 +02:00
parent 2f56a97f24
commit 2420763638
2 changed files with 2 additions and 2 deletions

View File

@ -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, \

View File

@ -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,