* commit '1565cbc65cbb9f95c11367314a080068895e0cf0': lavfi: make avfilter_free() remove the filter from its graph. Conflicts: libavfilter/avfilter.c libavfilter/avfiltergraph.c libavfilter/graphparser.c
Showing the changes to libavfilter/graphparser.c (1 of 5 files). Show all
Unified · Split
| @@ -430,8 +430,8 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters, · 429 unmodified lines | |||
| 430 | return 0; | 430 | return 0; |
| 431 | 431 | ||
| 432 | fail:end: | 432 | fail:end: |
| 433 | for (; graph->nb_filters > 0; graph->nb_filters--) | 433 | while (graph->nb_filters) |
| 434 | avfilter_free(graph->filters[graph->nb_filters - 1]); | 434 | avfilter_free(graph->filters[0]); |
| 435 | av_freep(&graph->filters); | 435 | av_freep(&graph->filters); |
| 436 | avfilter_inout_free(&open_inputs); | 436 | avfilter_inout_free(&open_inputs); |
| 437 | avfilter_inout_free(&open_outputs); | 437 | avfilter_inout_free(&open_outputs); |
| @@ -498,8 +498,8 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, · 60 unmodified lines | |||
| 498 | 498 | ||
| 499 | fail: | 499 | fail: |
| 500 | if (ret < 0) { | 500 | if (ret < 0) { |
| 501 | for (; graph->nb_filters > 0; graph->nb_filters--) | 501 | while (graph->nb_filters) |
| 502 | avfilter_free(graph->filters[graph->nb_filters - 1]); | 502 | avfilter_free(graph->filters[0]); |
| 503 | av_freep(&graph->filters); | 503 | av_freep(&graph->filters); |
| 504 | } | 504 | } |
| 505 | avfilter_inout_free(&inputs); | 505 | avfilter_inout_free(&inputs); |