diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/graph2dot.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/graph2dot.c b/tools/graph2dot.c index d5c1e4e3c7..fd7ea2848e 100644 --- a/tools/graph2dot.c +++ b/tools/graph2dot.c @@ -113,7 +113,7 @@ int main(int argc, char **argv) FILE *outfile = NULL; FILE *infile = NULL; char *graph_string = NULL; - AVFilterGraph *graph = av_mallocz(sizeof(AVFilterGraph)); + AVFilterGraph *graph = NULL; char c; av_log_set_level(AV_LOG_DEBUG); @@ -189,6 +189,12 @@ int main(int argc, char **argv) *p = '\0'; } + graph = avfilter_graph_alloc(); + if (!graph) { + fprintf(stderr, "Memory allocation failure\n"); + return 1; + } + if (avfilter_graph_parse(graph, graph_string, NULL, NULL, NULL) < 0) { fprintf(stderr, "Failed to parse the graph description\n"); return 1; |