Showing the changes to libavfilter/avfiltergraph.c (1 of 2 files). Show all
Unified · Split
| @@ -374,6 +374,21 @@ int ff_avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx) · 373 unmodified lines | ||
| 374 | 374 | return 0; |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | +static void ff_avfilter_graph_config_pointers(AVFilterGraph *graph, | |
| 378 | + AVClass *log_ctx) | |
| 379 | +{ | |
| 380 | + unsigned i, j;; | |
| 381 | + AVFilterContext *f; | |
| 382 | + | |
| 383 | + for (i = 0; i < graph->filter_count; i++) { | |
| 384 | + f = graph->filters[i]; | |
| 385 | + for (j = 0; j < f->input_count; j++) | |
| 386 | + f->inputs[j]->graph = graph; | |
| 387 | + for (j = 0; j < f->output_count; j++) | |
| 388 | + f->outputs[j]->graph = graph; | |
| 389 | + } | |
| 390 | +} | |
| 391 | + | |
| 377 | 392 | int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx) |
| 378 | 393 | { |
| 379 | 394 | int ret; |
| @@ -384,6 +399,7 @@ int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx) · 4 unmodified lines | ||
| 384 | 399 | return ret; |
| 385 | 400 | if ((ret = ff_avfilter_graph_config_links(graphctx, log_ctx))) |
| 386 | 401 | return ret; |
| 402 | + ff_avfilter_graph_config_pointers(graphctx, log_ctx); | |
| 387 | 403 | |
| 388 | 404 | return 0; |
| 389 | 405 | } |