History

Merge commit '7e8fe4be5fb4c98aa3c6a4ed3cec999f4e3cc3aa'

* commit '7e8fe4be5fb4c98aa3c6a4ed3cec999f4e3cc3aa': lavfi: add a function for counting elements in AVFilterPad arrays.

Michael Niedermayer committed 13 years ago

Commit f4db6bf2 parents 16fc24b 7e8fe4b3 files · +10 −3Browse files

Unified · Split

3 files
  1. doc/APIchanges +1 −0
  2. libavfilter/avfilter.c +3 −3
  3. libavfilter/avfilter.h +6 −0
doc/APIchanges+1−0
@@ -170,6 +170,7 @@ API changes, most recent first: · 169 unmodified lines
170170 Add avfilter_init_str(), deprecate avfilter_init_filter().
171171 Add avfilter_init_dict().
172172 Add AVFilter.flags field and AVFILTER_FLAG_DYNAMIC_{INPUTS,OUTPUTS} flags.
173+ Add avfilter_pad_count() for counting filter inputs/outputs.
173174
174175 2013-xx-xx - lavfi 3.7.0 - avfilter.h
175176 Add AVFilter.priv_class for exporting filter options through the AVOptions API
libavfilter/avfilter.c+3−3
@@ -436,7 +436,7 @@ void avfilter_uninit(void) · 435 unmodified lines
436436 next_registered_avfilter_idx = 0;
437437 }
438438
439−static int pad_count(const AVFilterPad *pads)
439+int avfilter_pad_count(const AVFilterPad *pads)
440440 {
441441 int count;
442442
@@ -515,7 +515,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) · 72 unmodified lines
515515 av_opt_set_defaults(ret->priv);
516516 }
517517
518− ret->nb_inputs = pad_count(filter->inputs);
518+ ret->nb_inputs = avfilter_pad_count(filter->inputs);
519519 if (ret->nb_inputs ) {
520520 ret->input_pads = av_malloc(sizeof(AVFilterPad) * ret->nb_inputs);
521521 if (!ret->input_pads)
@@ -526,7 +526,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) · 4 unmodified lines
526526 goto err;
527527 }
528528
529− ret->nb_outputs = pad_count(filter->outputs);
529+ ret->nb_outputs = avfilter_pad_count(filter->outputs);
530530 if (ret->nb_outputs) {
531531 ret->output_pads = av_malloc(sizeof(AVFilterPad) * ret->nb_outputs);
532532 if (!ret->output_pads)
libavfilter/avfilter.h+6−0
@@ -388,6 +388,12 @@ struct AVFilterPad { · 387 unmodified lines
388388 };
389389 #endif
390390
391+/**
392+ * Get the number of elements in a NULL-terminated array of AVFilterPads (e.g.
393+ * AVFilter.inputs/outputs).
394+ */
395+int avfilter_pad_count(const AVFilterPad *pads);
396+
391397 /**
392398 * Get the name of an AVFilterPad.
393399 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t