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

vitor subversion
Fri Apr 4 22:05:02 CEST 2008


Author: vitor
Date: Fri Apr  4 22:05:01 2008
New Revision: 12690

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

Commited in SoC by Bobby Bingham on 2007-07-14 23:19:22


Modified:
   trunk/libavfilter/avfiltergraph.c

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