aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-11 21:29:34 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-22 16:12:06 +0200
commitdff1709eb2dc6f3f8128abb4e2c764cc7c5fc92b (patch)
tree387fd8e3d37e3ea27bff4bd7a2cbd95cdc655168 /libavfilter/avfilter.c
parentd905af0c2409c854dcd45a05fe4caf9ac49d82ad (diff)
downloadffmpeg-dff1709eb2dc6f3f8128abb4e2c764cc7c5fc92b.tar.gz
avfilter/internal: Uninline ff_insert_(in|out)pad()
These functions are not hot at all. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 28123655d6..2681d04fc0 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -101,9 +101,17 @@ void ff_command_queue_pop(AVFilterContext *filter)
av_free(c);
}
-int ff_append_pad(unsigned *count,
- AVFilterPad **pads, AVFilterLink ***links,
- AVFilterPad *newpad)
+/**
+ * Append a new pad.
+ *
+ * @param count Pointer to the number of pads in the list
+ * @param pads Pointer to the pointer to the beginning of the list of pads
+ * @param links Pointer to the pointer to the beginning of the list of links
+ * @param newpad The new pad to add. A copy is made when adding.
+ * @return >= 0 in case of success, a negative AVERROR code on error
+ */
+static int append_pad(unsigned *count, AVFilterPad **pads,
+ AVFilterLink ***links, AVFilterPad *newpad)
{
AVFilterLink **newlinks;
AVFilterPad *newpads;
@@ -126,6 +134,16 @@ int ff_append_pad(unsigned *count,
return 0;
}
+int ff_append_inpad(AVFilterContext *f, AVFilterPad *p)
+{
+ return append_pad(&f->nb_inputs, &f->input_pads, &f->inputs, p);
+}
+
+int ff_append_outpad(AVFilterContext *f, AVFilterPad *p)
+{
+ return append_pad(&f->nb_outputs, &f->output_pads, &f->outputs, p);
+}
+
int avfilter_link(AVFilterContext *src, unsigned srcpad,
AVFilterContext *dst, unsigned dstpad)
{