]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Move destruction of the graph's filters to its own helper function.
authorvitor <vitor@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 4 Apr 2008 20:03:33 +0000 (20:03 +0000)
committervitor <vitor@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 4 Apr 2008 20:03:33 +0000 (20:03 +0000)
Commited in SoC by Bobby Bingham on 2007-07-14 21:41:34

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12687 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavfilter/avfiltergraph.c

index 7b9d96379a2572f053f86f66a68bb118d1d2af2e..4e5bfd2f1014cc11ad0e611e585340ec2033a44d 100644 (file)
@@ -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);
 }