[FFmpeg-soc] [soc]: r422 - libavfilter/avfiltergraph.c

koorogi subversion at mplayerhq.hu
Sat Jul 14 23:41:34 CEST 2007


Author: koorogi
Date: Sat Jul 14 23:41:34 2007
New Revision: 422

Log:
Move destruction of the graph's filters to its own helper function.


Modified:
   libavfilter/avfiltergraph.c

Modified: libavfilter/avfiltergraph.c
==============================================================================
--- libavfilter/avfiltergraph.c	(original)
+++ libavfilter/avfiltergraph.c	Sat Jul 14 23:41:34 2007
@@ -32,13 +32,18 @@ AVFilterGraph *avfilter_create_graph(voi
     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);
 }
 



More information about the FFmpeg-soc mailing list