You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e8e5dde779
)
This commit is contained in:
committed by
Michael Niedermayer
parent
2d9fd1810b
commit
c68be8e135
@@ -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);
|
||||
|
Reference in New Issue
Block a user