[FFmpeg-devel] [PATCH 16/26] avfilter: remove FF_API_BUFFERSINK_ALLOC
James Almer
jamrial at gmail.com
Mon Jan 16 15:38:30 EET 2023
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavfilter/buffersink.c | 22 ----------------------
libavfilter/buffersink.h | 36 ------------------------------------
libavfilter/version_major.h | 1 -
3 files changed, 59 deletions(-)
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index e269cf72d1..306c283f77 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -154,28 +154,6 @@ int attribute_align_arg av_buffersink_get_samples(AVFilterContext *ctx,
return get_frame_internal(ctx, frame, 0, nb_samples);
}
-#if FF_API_BUFFERSINK_ALLOC
-AVBufferSinkParams *av_buffersink_params_alloc(void)
-{
- static const int pixel_fmts[] = { AV_PIX_FMT_NONE };
- AVBufferSinkParams *params = av_malloc(sizeof(AVBufferSinkParams));
- if (!params)
- return NULL;
-
- params->pixel_fmts = pixel_fmts;
- return params;
-}
-
-AVABufferSinkParams *av_abuffersink_params_alloc(void)
-{
- AVABufferSinkParams *params = av_mallocz(sizeof(AVABufferSinkParams));
-
- if (!params)
- return NULL;
- return params;
-}
-#endif
-
static av_cold int common_init(AVFilterContext *ctx)
{
BufferSinkContext *buf = ctx->priv;
diff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h
index 01e7c747d8..64e08de53e 100644
--- a/libavfilter/buffersink.h
+++ b/libavfilter/buffersink.h
@@ -94,42 +94,6 @@ int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flag
*/
#define AV_BUFFERSINK_FLAG_NO_REQUEST 2
-#if FF_API_BUFFERSINK_ALLOC
-/**
- * Deprecated and unused struct to use for initializing a buffersink context.
- */
-typedef struct AVBufferSinkParams {
- const enum AVPixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by AV_PIX_FMT_NONE
-} AVBufferSinkParams;
-
-/**
- * Create an AVBufferSinkParams structure.
- *
- * Must be freed with av_free().
- */
-attribute_deprecated
-AVBufferSinkParams *av_buffersink_params_alloc(void);
-
-/**
- * Deprecated and unused struct to use for initializing an abuffersink context.
- */
-typedef struct AVABufferSinkParams {
- const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE
- const int64_t *channel_layouts; ///< list of allowed channel layouts, terminated by -1
- const int *channel_counts; ///< list of allowed channel counts, terminated by -1
- int all_channel_counts; ///< if not 0, accept any channel count or layout
- int *sample_rates; ///< list of allowed sample rates, terminated by -1
-} AVABufferSinkParams;
-
-/**
- * Create an AVABufferSinkParams structure.
- *
- * Must be freed with av_free().
- */
-attribute_deprecated
-AVABufferSinkParams *av_abuffersink_params_alloc(void);
-#endif
-
/**
* Set the frame size for an audio buffer sink.
*
diff --git a/libavfilter/version_major.h b/libavfilter/version_major.h
index 655e3d119d..5a8bf4eda2 100644
--- a/libavfilter/version_major.h
+++ b/libavfilter/version_major.h
@@ -35,7 +35,6 @@
* the public API and may change, break or disappear at any time.
*/
-#define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9)
#define FF_API_PAD_COUNT (LIBAVFILTER_VERSION_MAJOR < 9)
#endif /* AVFILTER_VERSION_MAJOR_H */
--
2.39.0
More information about the ffmpeg-devel
mailing list