summaryrefslogtreecommitdiff
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r--libavfilter/graphparser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index d48828ea24..ea0a86d51a 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -435,8 +435,8 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
return 0;
fail:
- for (; graph->filter_count > 0; graph->filter_count--)
- avfilter_free(graph->filters[graph->filter_count - 1]);
+ for (; graph->nb_filters > 0; graph->nb_filters--)
+ avfilter_free(graph->filters[graph->nb_filters - 1]);
av_freep(&graph->filters);
avfilter_inout_free(&open_inputs);
avfilter_inout_free(&open_outputs);
@@ -500,8 +500,8 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
fail:
if (ret < 0) {
- for (; graph->filter_count > 0; graph->filter_count--)
- avfilter_free(graph->filters[graph->filter_count - 1]);
+ for (; graph->nb_filters > 0; graph->nb_filters--)
+ avfilter_free(graph->filters[graph->nb_filters - 1]);
av_freep(&graph->filters);
}
avfilter_inout_free(&inputs);