diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-04-19 12:43:33 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-04-23 14:13:40 +0200 |
commit | e0761feec4dc9d10bd0fa58a0472b69277563e92 (patch) | |
tree | ca32a0b35db1eb82c2e90020b121a973e131d340 /libavfilter/avfiltergraph.c | |
parent | 78ac49c2335f387d2c3d080b619c27ecd69fb41f (diff) | |
download | ffmpeg-e0761feec4dc9d10bd0fa58a0472b69277563e92.tar.gz |
avfilter: add a pointer from links to graph.
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r-- | libavfilter/avfiltergraph.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 334d718778..e46ace5c19 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -374,6 +374,21 @@ int ff_avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx) return 0; } +static void ff_avfilter_graph_config_pointers(AVFilterGraph *graph, + AVClass *log_ctx) +{ + unsigned i, j;; + AVFilterContext *f; + + for (i = 0; i < graph->filter_count; i++) { + f = graph->filters[i]; + for (j = 0; j < f->input_count; j++) + f->inputs[j]->graph = graph; + for (j = 0; j < f->output_count; j++) + f->outputs[j]->graph = graph; + } +} + int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx) { int ret; @@ -384,6 +399,7 @@ int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx) return ret; if ((ret = ff_avfilter_graph_config_links(graphctx, log_ctx))) return ret; + ff_avfilter_graph_config_pointers(graphctx, log_ctx); return 0; } |