aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-12 00:54:05 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-12 00:54:05 +0200
commiteb0f774d4bfdb1e5cb131f63580417cfb6b47514 (patch)
tree4b09152f83728967ff6bd1bd3a0d72213be4d26f /libavfilter/graphparser.c
parent4fde705396759ad96a662a400d5f1667c19c614b (diff)
parent1565cbc65cbb9f95c11367314a080068895e0cf0 (diff)
downloadffmpeg-eb0f774d4bfdb1e5cb131f63580417cfb6b47514.tar.gz
Merge commit '1565cbc65cbb9f95c11367314a080068895e0cf0'
* commit '1565cbc65cbb9f95c11367314a080068895e0cf0': lavfi: make avfilter_free() remove the filter from its graph. Conflicts: libavfilter/avfilter.c libavfilter/avfiltergraph.c libavfilter/graphparser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 3af9b56021..447b9ebc5d 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -430,8 +430,8 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
return 0;
fail:end:
- for (; graph->nb_filters > 0; graph->nb_filters--)
- avfilter_free(graph->filters[graph->nb_filters - 1]);
+ while (graph->nb_filters)
+ avfilter_free(graph->filters[0]);
av_freep(&graph->filters);
avfilter_inout_free(&open_inputs);
avfilter_inout_free(&open_outputs);
@@ -498,8 +498,8 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
fail:
if (ret < 0) {
- for (; graph->nb_filters > 0; graph->nb_filters--)
- avfilter_free(graph->filters[graph->nb_filters - 1]);
+ while (graph->nb_filters)
+ avfilter_free(graph->filters[0]);
av_freep(&graph->filters);
}
avfilter_inout_free(&inputs);