* commit '7e8fe4be5fb4c98aa3c6a4ed3cec999f4e3cc3aa': lavfi: add a function for counting elements in AVFilterPad arrays.
Showing the changes to libavfilter/avfilter.c (1 of 3 files). Show all
Unified · Split
| @@ -436,7 +436,7 @@ void avfilter_uninit(void) · 435 unmodified lines | ||
| 436 | 436 | next_registered_avfilter_idx = 0; |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | −static int pad_count(const AVFilterPad *pads) | |
| 439 | +int avfilter_pad_count(const AVFilterPad *pads) | |
| 440 | 440 | { |
| 441 | 441 | int count; |
| 442 | 442 | |
| @@ -515,7 +515,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) · 72 unmodified lines | ||
| 515 | 515 | av_opt_set_defaults(ret->priv); |
| 516 | 516 | } |
| 517 | 517 | |
| 518 | − ret->nb_inputs = pad_count(filter->inputs); | |
| 518 | + ret->nb_inputs = avfilter_pad_count(filter->inputs); | |
| 519 | 519 | if (ret->nb_inputs ) { |
| 520 | 520 | ret->input_pads = av_malloc(sizeof(AVFilterPad) * ret->nb_inputs); |
| 521 | 521 | if (!ret->input_pads) |
| @@ -526,7 +526,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) · 4 unmodified lines | ||
| 526 | 526 | goto err; |
| 527 | 527 | } |
| 528 | 528 | |
| 529 | − ret->nb_outputs = pad_count(filter->outputs); | |
| 529 | + ret->nb_outputs = avfilter_pad_count(filter->outputs); | |
| 530 | 530 | if (ret->nb_outputs) { |
| 531 | 531 | ret->output_pads = av_malloc(sizeof(AVFilterPad) * ret->nb_outputs); |
| 532 | 532 | if (!ret->output_pads) |