Unified · Split
| @@ -586,8 +586,8 @@ end: · 585 unmodified lines | ||
| 586 | 586 | avfilter_inout_free(&curr_inputs); |
| 587 | 587 | |
| 588 | 588 | if (ret < 0) { |
| 589 | − for (; graph->nb_filters > 0; graph->nb_filters--) | |
| 590 | − avfilter_free(graph->filters[graph->nb_filters - 1]); | |
| 589 | + while (graph->nb_filters) | |
| 590 | + avfilter_free(graph->filters[0]); | |
| 591 | 591 | av_freep(&graph->filters); |
| 592 | 592 | } |
| 593 | 593 | return ret; |