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

koorogi subversion at mplayerhq.hu
Sun Jul 15 01:19:22 CEST 2007


Author: koorogi
Date: Sun Jul 15 01:19:22 2007
New Revision: 425

Log:
Ensure that the filter_count member is reset to zero when emptying the graph


Modified:
   libavfilter/avfiltergraph.c

Modified: libavfilter/avfiltergraph.c
==============================================================================
--- libavfilter/avfiltergraph.c	(original)
+++ libavfilter/avfiltergraph.c	Sun Jul 15 01:19:22 2007
@@ -37,10 +37,8 @@ AVFilterGraph *avfilter_create_graph(voi
 
 static void destroy_graph_filters(AVFilterGraph *graph)
 {
-    unsigned i;
-
-    for(i = 0; i < graph->filter_count; i ++)
-        avfilter_destroy(graph->filters[i]);
+    for(; graph->filter_count > 0; graph->filter_count --)
+        avfilter_destroy(graph->filters[graph->filter_count - 1]);
     av_freep(&graph->filters);
 }
 



More information about the FFmpeg-soc mailing list