You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avfilter: add a pointer from links to graph.
This commit is contained in:
@@ -690,6 +690,12 @@ struct AVFilterLink {
|
|||||||
AVRational time_base;
|
AVRational time_base;
|
||||||
|
|
||||||
struct AVFilterPool *pool;
|
struct AVFilterPool *pool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Graph the filter belongs to.
|
||||||
|
*/
|
||||||
|
struct AVFilterGraph *graph;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -374,6 +374,21 @@ int ff_avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx)
|
|||||||
return 0;
|
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 avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -384,6 +399,7 @@ int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)
|
|||||||
return ret;
|
return ret;
|
||||||
if ((ret = ff_avfilter_graph_config_links(graphctx, log_ctx)))
|
if ((ret = ff_avfilter_graph_config_links(graphctx, log_ctx)))
|
||||||
return ret;
|
return ret;
|
||||||
|
ff_avfilter_graph_config_pointers(graphctx, log_ctx);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user