mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user