summaryrefslogtreecommitdiff
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-18 02:02:31 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-18 02:08:38 +0200
commit8055433b492fe971a145a07470119ef8c2c71571 (patch)
tree023d3081eee485a89d9675c544086c1232f05aba /libavfilter/graphparser.c
parent369c68c4e121d9f883e240604050daf7fac1b870 (diff)
graphparser: add missing NULL check in avfilter_graph_parse()
Fix a crash occurring when open_inputs is NULL and *open_inputs is checked, the crash was introduced by the recent avfilter_graph_parse() syntax change. In particular, fix graph2dot crash.
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r--libavfilter/graphparser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index d62ba8d205..5178eea4c6 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -387,7 +387,7 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
goto fail;
}
- if (*open_inputs && !strcmp((*open_inputs)->name, "out") && curr_inputs) {
+ if (open_inputs && *open_inputs && !strcmp((*open_inputs)->name, "out") && curr_inputs) {
/* Last output can be omitted if it is "[out]" */
const char *tmp = "[out]";
if ((ret = parse_outputs(&tmp, &curr_inputs, open_inputs, open_outputs,