diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-05-31 16:30:12 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-05-31 16:30:12 +0000 |
commit | 4ec42240cad351bbd8ca619dd0f38064eeec29dd (patch) | |
tree | 1eba9dc82a0672251c2cde326fb2024dc0f2007b /libavfilter | |
parent | c70ac8e7f546b93bf36f6d9fac623ab5a4abc63a (diff) | |
download | ffmpeg-4ec42240cad351bbd8ca619dd0f38064eeec29dd.tar.gz |
Implement avfilter_graph_config_links().
Originally committed as revision 19066 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfiltergraph.c | 17 | ||||
-rw-r--r-- | libavfilter/avfiltergraph.h | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 4b24508f5f..269d566d5f 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -77,6 +77,23 @@ int avfilter_graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx) return 0; } +int avfilter_graph_config_links(AVFilterGraph *graph, AVClass *log_ctx) +{ + AVFilterContext *filt; + int i, ret; + + for (i=0; i < graph->filter_count; i++) { + filt = graph->filters[i]; + + if (!filt->output_count) { + if ((ret = avfilter_config_links(filt))) + return ret; + } + } + + return 0; +} + AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, char *name) { int i; diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h index fdae73c564..c78d53f0a3 100644 --- a/libavfilter/avfiltergraph.h +++ b/libavfilter/avfiltergraph.h @@ -57,6 +57,13 @@ int avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext *filter); int avfilter_graph_check_validity(AVFilterGraph *graphctx, AVClass *log_ctx); /** + * Configures all the links of graphctx. + * + * @return 0 in case of success, a negative value otherwise + */ +int avfilter_graph_config_links(AVFilterGraph *graphctx, AVClass *log_ctx); + +/** * Configures the formats of all the links in the graph. */ int avfilter_graph_config_formats(AVFilterGraph *graphctx); |