[FFmpeg-devel] [PATCH 05/10] avfilter/avfilter: Deprecate avfilter_pad_count()
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Sun Aug 15 12:55:33 EEST 2021
It is unnecessary as the number of static inputs and outputs can now
be directly read via AVFilter.nb_(in|out)puts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavfilter/avfilter.h | 5 +++++
libavfilter/version.h | 3 +++
2 files changed, 8 insertions(+)
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 0905f308eb..6006663e70 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -70,10 +70,15 @@ typedef struct AVFilterPad AVFilterPad;
typedef struct AVFilterFormats AVFilterFormats;
typedef struct AVFilterChannelLayouts AVFilterChannelLayouts;
+#if FF_API_PAD_COUNT
/**
* Get the number of elements in an AVFilter's inputs or outputs array.
+ *
+ * @deprecated Use avfilter_filter_pad_count() instead.
*/
+attribute_deprecated
int avfilter_pad_count(const AVFilterPad *pads);
+#endif
/**
* Get the name of an AVFilterPad.
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 75cd10dccd..31d9e6750c 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -56,5 +56,8 @@
#ifndef FF_API_BUFFERSINK_ALLOC
#define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9)
#endif
+#ifndef FF_API_PAD_COUNT
+#define FF_API_PAD_COUNT (LIBAVFILTER_VERSION_MAJOR < 9)
+#endif
#endif /* AVFILTER_VERSION_H */
--
2.30.2
More information about the ffmpeg-devel
mailing list