[FFmpeg-devel] [PATCH 06/11] avutil/downmix_info: deprecate av_downmix_info_update_side_data()
James Almer
jamrial at gmail.com
Thu Feb 20 19:24:49 EET 2025
It's no longer needed after the addition of av_frame_side_data_new_struct()
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavutil/downmix_info.c | 2 ++
libavutil/downmix_info.h | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/libavutil/downmix_info.c b/libavutil/downmix_info.c
index 7e6c3e854d..76ecc2215a 100644
--- a/libavutil/downmix_info.c
+++ b/libavutil/downmix_info.c
@@ -21,6 +21,7 @@
#include "downmix_info.h"
#include "frame.h"
+#if FF_API_CREATE_SIDE_DATA
AVDownmixInfo *av_downmix_info_update_side_data(AVFrame *frame)
{
AVFrameSideData *side_data;
@@ -39,3 +40,4 @@ AVDownmixInfo *av_downmix_info_update_side_data(AVFrame *frame)
return (AVDownmixInfo*)side_data->data;
}
+#endif
diff --git a/libavutil/downmix_info.h b/libavutil/downmix_info.h
index 221cf5bf9b..6580f8873e 100644
--- a/libavutil/downmix_info.h
+++ b/libavutil/downmix_info.h
@@ -21,7 +21,9 @@
#ifndef AVUTIL_DOWNMIX_INFO_H
#define AVUTIL_DOWNMIX_INFO_H
+#include "attributes.h"
#include "frame.h"
+#include "version.h"
/**
* @file
@@ -92,6 +94,7 @@ typedef struct AVDownmixInfo {
double lfe_mix_level;
} AVDownmixInfo;
+#if FF_API_CREATE_SIDE_DATA
/**
* Get a frame's AV_FRAME_DATA_DOWNMIX_INFO side data for editing.
*
@@ -99,10 +102,13 @@ typedef struct AVDownmixInfo {
*
* @param frame the frame for which the side data is to be obtained or created
*
+ * @deprecated use @ref av_frame_side_data_new_struct() and @ref av_frame_side_data_get()
* @return the AVDownmixInfo structure to be edited by the caller, or NULL if
* the structure cannot be allocated.
*/
+attribute_deprecated
AVDownmixInfo *av_downmix_info_update_side_data(AVFrame *frame);
+#endif
/**
* @}
--
2.48.1
More information about the ffmpeg-devel
mailing list