Commit 8055433b authored by Stefano Sabatini's avatar Stefano Sabatini

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.
parent 369c68c4
...@@ -387,7 +387,7 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, ...@@ -387,7 +387,7 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
goto fail; 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]" */ /* Last output can be omitted if it is "[out]" */
const char *tmp = "[out]"; const char *tmp = "[out]";
if ((ret = parse_outputs(&tmp, &curr_inputs, open_inputs, open_outputs, if ((ret = parse_outputs(&tmp, &curr_inputs, open_inputs, open_outputs,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment