[FFmpeg-cvslog] r12687 - trunk/libavfilter/avfiltergraph.c

vitor subversion
Fri Apr 4 22:03:33 CEST 2008


Author: vitor
Date: Fri Apr  4 22:03:33 2008
New Revision: 12687

Log:
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


Modified:
   trunk/libavfilter/avfiltergraph.c

Modified: trunk/libavfilter/avfiltergraph.c
==============================================================================
--- trunk/libavfilter/avfiltergraph.c	(original)
+++ trunk/libavfilter/avfiltergraph.c	Fri Apr  4 22:03:33 2008
@@ -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-cvslog mailing list