diff options
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r-- | libavfilter/avfiltergraph.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 8d2312e05d..da5015ca88 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -102,7 +102,15 @@ void avfilter_graph_set_auto_convert(AVFilterGraph *graph, unsigned flags) graph->disable_auto_convert = flags; } -int ff_avfilter_graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx) +/** + * Check for the validity of graph. + * + * A graph is considered valid if all its input and output pads are + * connected. + * + * @return 0 in case of success, a negative value otherwise + */ +static int graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx) { AVFilterContext *filt; int i, j; @@ -132,7 +140,12 @@ int ff_avfilter_graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx) return 0; } -int ff_avfilter_graph_config_links(AVFilterGraph *graph, AVClass *log_ctx) +/** + * Configure all the links of graphctx. + * + * @return 0 in case of success, a negative value otherwise + */ +static int graph_config_links(AVFilterGraph *graph, AVClass *log_ctx) { AVFilterContext *filt; int i, ret; @@ -688,7 +701,10 @@ static int pick_formats(AVFilterGraph *graph) return 0; } -int ff_avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx) +/** + * Configure the formats of all the links in the graph. + */ +static int graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx) { int ret; @@ -759,11 +775,11 @@ int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx) { int ret; - if ((ret = ff_avfilter_graph_check_validity(graphctx, log_ctx))) + if ((ret = graph_check_validity(graphctx, log_ctx))) return ret; - if ((ret = ff_avfilter_graph_config_formats(graphctx, log_ctx))) + if ((ret = graph_config_formats(graphctx, log_ctx))) return ret; - if ((ret = ff_avfilter_graph_config_links(graphctx, log_ctx))) + if ((ret = graph_config_links(graphctx, log_ctx))) return ret; if ((ret = ff_avfilter_graph_config_pointers(graphctx, log_ctx))) return ret; |