diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-04-05 00:05:01 +0400 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-04-05 00:05:01 +0400 |
commit | 65a4bd9c9ecd965f7f9e01ded23abe3d7c6dfb94 (patch) | |
tree | 605ad113c4a32331ead8a58d50f0185a6c1086dc /libavfilter | |
parent | ba56640c30656757c57e9015890c2521d658ea79 (diff) |
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
Originally committed as revision 12690 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfiltergraph.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index d4b6bf1b87..684da30380 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -37,10 +37,8 @@ AVFilterGraph *avfilter_create_graph(void) 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); } |