1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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.
This commit is contained in:
Stefano Sabatini 2011-06-18 02:02:31 +02:00
parent 369c68c4e1
commit 8055433b49

View File

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