It's no longer needed after the addition of av_frame_side_data_new_struct()

Signed-off-by: James Almer <jamr...@gmail.com>
---
 libavutil/ambient_viewing_environment.c | 2 ++
 libavutil/ambient_viewing_environment.h | 6 ++++++
 libavutil/version.h                     | 1 +
 3 files changed, 9 insertions(+)

diff --git a/libavutil/ambient_viewing_environment.c 
b/libavutil/ambient_viewing_environment.c
index ee2e9427cd..16858bf206 100644
--- a/libavutil/ambient_viewing_environment.c
+++ b/libavutil/ambient_viewing_environment.c
@@ -46,6 +46,7 @@ AVAmbientViewingEnvironment 
*av_ambient_viewing_environment_alloc(size_t *size)
     return env;
 }
 
+#if FF_API_CREATE_SIDE_DATA
 AVAmbientViewingEnvironment 
*av_ambient_viewing_environment_create_side_data(AVFrame *frame)
 {
     AVFrameSideData *side_data =
@@ -60,3 +61,4 @@ AVAmbientViewingEnvironment 
*av_ambient_viewing_environment_create_side_data(AVF
 
     return (AVAmbientViewingEnvironment *)side_data->data;
 }
+#endif
diff --git a/libavutil/ambient_viewing_environment.h 
b/libavutil/ambient_viewing_environment.h
index e5e4ac2173..08aac686f0 100644
--- a/libavutil/ambient_viewing_environment.h
+++ b/libavutil/ambient_viewing_environment.h
@@ -22,8 +22,10 @@
 #define AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H
 
 #include <stddef.h>
+#include "attributes.h"
 #include "frame.h"
 #include "rational.h"
+#include "version.h"
 
 /**
  * Ambient viewing environment metadata as defined by H.274. The values are
@@ -61,12 +63,16 @@ typedef struct AVAmbientViewingEnvironment {
  */
 AVAmbientViewingEnvironment *av_ambient_viewing_environment_alloc(size_t 
*size);
 
+#if FF_API_CREATE_SIDE_DATA
 /**
  * Allocate and add an AVAmbientViewingEnvironment structure to an existing
  * AVFrame as side data.
  *
+ * @deprecated use @ref av_frame_side_data_new_struct()
  * @return the newly allocated struct, or NULL on failure
  */
+attribute_deprecated
 AVAmbientViewingEnvironment 
*av_ambient_viewing_environment_create_side_data(AVFrame *frame);
+#endif
 
 #endif /* AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H */
diff --git a/libavutil/version.h b/libavutil/version.h
index ee4a36cb17..b70c8744cb 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -117,6 +117,7 @@
 #define FF_API_VULKAN_FIXED_QUEUES      (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_OPT_INT_LIST             (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_OPT_PTR                  (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_CREATE_SIDE_DATA         (LIBAVUTIL_VERSION_MAJOR < 61)
 
 /**
  * @}
-- 
2.48.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to