diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-04-04 20:03:33 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-04-04 20:03:33 +0000 |
commit | ffcaef348580ba32c57a85e115c0809e5b857d95 (patch) | |
tree | f55ac3da8278d831eafef500f1f6f49885d5590b /libavfilter/avfiltergraph.c | |
parent | eccb6fb7ceee92a8f7456005246c38c66aac8550 (diff) | |
download | ffmpeg-ffcaef348580ba32c57a85e115c0809e5b857d95.tar.gz |
Move destruction of the graph's filters to its own helper function.
Commited in SoC by Bobby Bingham on 2007-07-14 21:41:34
Originally committed as revision 12687 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r-- | libavfilter/avfiltergraph.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 7b9d96379a..4e5bfd2f10 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -32,13 +32,18 @@ AVFilterGraph *avfilter_create_graph(void) return av_mallocz(sizeof(AVFilterGraph)); } -void avfilter_destroy_graph(AVFilterGraph *graph) +static void destroy_graph_filters(AVFilterGraph *graph) { unsigned i; for(i = 0; i < graph->filter_count; i ++) avfilter_destroy(graph->filters[i]); - av_free(graph->filters); + av_freep(&graph->filters); +} + +void avfilter_destroy_graph(AVFilterGraph *graph) +{ + destroy_graph_filters(graph); av_free(graph); } |