提交 e8e5dde7 编写于 作者: S Stefano Sabatini 提交者: 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: NMans Rullgard <mans@mansr.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册