aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-28 08:59:13 +0100
committerAnton Khirnov <anton@khirnov.net>2013-04-11 20:43:47 +0200
commit7e8fe4be5fb4c98aa3c6a4ed3cec999f4e3cc3aa (patch)
treeffc4b54bef0847a945ec4aa2cd834015b7035bc7 /libavfilter/avfilter.c
parent7cdd737ba81b5c2c9521c4509edf0ac315fabc65 (diff)
downloadffmpeg-7e8fe4be5fb4c98aa3c6a4ed3cec999f4e3cc3aa.tar.gz
lavfi: add a function for counting elements in AVFilterPad arrays.
The caller needs to know what valid indices can be passed to avfilter_pad_get_name/type.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index e127bd35d0..a707c0dfdb 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -304,7 +304,7 @@ void avfilter_uninit(void)
next_registered_avfilter_idx = 0;
}
-static int pad_count(const AVFilterPad *pads)
+int avfilter_pad_count(const AVFilterPad *pads)
{
int count;
@@ -377,7 +377,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name)
av_opt_set_defaults(ret->priv);
}
- ret->nb_inputs = pad_count(filter->inputs);
+ ret->nb_inputs = avfilter_pad_count(filter->inputs);
if (ret->nb_inputs ) {
ret->input_pads = av_malloc(sizeof(AVFilterPad) * ret->nb_inputs);
if (!ret->input_pads)
@@ -388,7 +388,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name)
goto err;
}
- ret->nb_outputs = pad_count(filter->outputs);
+ ret->nb_outputs = avfilter_pad_count(filter->outputs);
if (ret->nb_outputs) {
ret->output_pads = av_malloc(sizeof(AVFilterPad) * ret->nb_outputs);
if (!ret->output_pads)