diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index de059b7f15acf9a59f23e6e7c9b1c5372e69e7b4..c30b0576959276e109d92cf77fe101763e541575 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -448,6 +448,8 @@ int avfilter_default_config_output_link(AVFilterLink *link)
 {
     return 0;
 }
+#endif
+#if FF_API_FILTERS_PUBLIC
 void avfilter_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,
                          AVFilterPad **pads, AVFilterLink ***links,
                          AVFilterPad *newpad)