These functions are not hot at all.
Showing the changes to libavfilter/avfilter.c (1 of 2 files). Show all
Unified · Split
| @@ -101,9 +101,17 @@ void ff_command_queue_pop(AVFilterContext *filter) · 100 unmodified lines | ||
| 101 | 101 | av_free(c); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | −int ff_append_pad(unsigned *count, | |
| 105 | − AVFilterPad **pads, AVFilterLink ***links, | |
| 106 | − AVFilterPad *newpad) | |
| 104 | +/** | |
| 105 | + * Append a new pad. | |
| 106 | + * | |
| 107 | + * @param count Pointer to the number of pads in the list | |
| 108 | + * @param pads Pointer to the pointer to the beginning of the list of pads | |
| 109 | + * @param links Pointer to the pointer to the beginning of the list of links | |
| 110 | + * @param newpad The new pad to add. A copy is made when adding. | |
| 111 | + * @return >= 0 in case of success, a negative AVERROR code on error | |
| 112 | + */ | |
| 113 | +static int append_pad(unsigned *count, AVFilterPad **pads, | |
| 114 | + AVFilterLink ***links, AVFilterPad *newpad) | |
| 107 | 115 | { |
| 108 | 116 | AVFilterLink **newlinks; |
| 109 | 117 | AVFilterPad *newpads; |
| @@ -126,6 +134,16 @@ int ff_append_pad(unsigned *count, · 16 unmodified lines | ||
| 126 | 134 | return 0; |
| 127 | 135 | } |
| 128 | 136 | |
| 137 | +int ff_append_inpad(AVFilterContext *f, AVFilterPad *p) | |
| 138 | +{ | |
| 139 | + return append_pad(&f->nb_inputs, &f->input_pads, &f->inputs, p); | |
| 140 | +} | |
| 141 | + | |
| 142 | +int ff_append_outpad(AVFilterContext *f, AVFilterPad *p) | |
| 143 | +{ | |
| 144 | + return append_pad(&f->nb_outputs, &f->output_pads, &f->outputs, p); | |
| 145 | +} | |
| 146 | + | |
| 129 | 147 | int avfilter_link(AVFilterContext *src, unsigned srcpad, |
| 130 | 148 | AVFilterContext *dst, unsigned dstpad) |
| 131 | 149 | { |