Commit e8e5dde7 authored by Stefano Sabatini's avatar Stefano Sabatini Committed by Mans Rullgard

Make avfilter_graph_parse() not free the input graph

Make avfilter_graph_parse() only release the internal structures
allocated during the parsing, and leave to free the graph itself to
the calling code.

This approach looks cleaner, as the graph is not allocated by the
function.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent e6fb5a4f
......@@ -393,7 +393,9 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
return 0;
fail:
avfilter_graph_free(graph);
for (; graph->filter_count > 0; graph->filter_count--)
avfilter_free(graph->filters[graph->filter_count - 1]);
av_freep(&graph->filters);
free_inout(open_inputs);
free_inout(open_outputs);
free_inout(curr_inputs);
......
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