avfilter/avfilter: Add avfilter_filter_pad_count()
It is intended as replacement for avfilter_pad_count(). In contrast to the latter, it avoids a loop. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
8be701d9f7
commit
7c5f998196
4 changed files with 14 additions and 1 deletions
|
|
@ -556,6 +556,11 @@ int avfilter_pad_count(const AVFilterPad *pads)
|
|||
av_assert0(!"AVFilterPad list not from a filter");
|
||||
}
|
||||
|
||||
unsigned avfilter_filter_pad_count(const AVFilter *filter, int is_output)
|
||||
{
|
||||
return is_output ? filter->nb_outputs : filter->nb_inputs;
|
||||
}
|
||||
|
||||
static const char *default_filter_name(void *filter_ctx)
|
||||
{
|
||||
AVFilterContext *ctx = filter_ctx;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue