]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/options: deprecate avcodec_get_frame_class()
authorJames Almer <jamrial@gmail.com>
Thu, 25 Feb 2021 20:30:28 +0000 (17:30 -0300)
committerJames Almer <jamrial@gmail.com>
Sat, 27 Feb 2021 14:23:42 +0000 (11:23 -0300)
AVFrame hasn't been a struct defined in libavcodec for a decade now, when
it was moved to libavutil.

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
doc/APIchanges
libavcodec/avcodec.h
libavcodec/options.c
libavcodec/version.h

index 33be750af2ef14b19ccabdf116d57db8e74f551d..a49e181c1310c23183baa61fe6d3e53712cdda39 100644 (file)
@@ -15,6 +15,9 @@ libavutil:     2017-10-21
 
 API changes, most recent first:
 
+2021-02-27 - xxxxxxxxxx - lavc 58.126.100 - avcodec.h
+  Deprecated avcodec_get_frame_class().
+
 2021-02-21 - xxxxxxxxxx - lavu 56.66.100 - tx.h
   Add enum AVTXFlags and AVTXFlags.AV_TX_INPLACE
 
index 3178c163b9b073e513ee893ca7819083e1e84bee..cd6e6d19bcee7b24787e22702fe094aa4a97bc17 100644 (file)
@@ -2770,13 +2770,13 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec);
  */
 const AVClass *avcodec_get_class(void);
 
+#if FF_API_GET_FRAME_CLASS
 /**
- * Get the AVClass for AVFrame. It can be used in combination with
- * AV_OPT_SEARCH_FAKE_OBJ for examining options.
- *
- * @see av_opt_find().
+ * @deprecated This function should not be used.
  */
+attribute_deprecated
 const AVClass *avcodec_get_frame_class(void);
+#endif
 
 /**
  * Get the AVClass for AVSubtitleRect. It can be used in combination with
index ff16e2cbfd63534e2444920299275bebf3bcedc6..6e904b61d89ca76486cba44ce16465df60fd461e 100644 (file)
@@ -312,6 +312,7 @@ const AVClass *avcodec_get_class(void)
     return &av_codec_context_class;
 }
 
+#if FF_API_GET_FRAME_CLASS
 #define FOFFSET(x) offsetof(AVFrame,x)
 
 static const AVOption frame_options[]={
@@ -338,6 +339,7 @@ const AVClass *avcodec_get_frame_class(void)
 {
     return &av_frame_class;
 }
+#endif
 
 #define SROFFSET(x) offsetof(AVSubtitleRect,x)
 
index 516411b4b2fb6017bd6d89acd044ef01e86b9e71..f4715063c0ebf66e06515de93835cde1e47143b1 100644 (file)
@@ -28,8 +28,8 @@
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  58
-#define LIBAVCODEC_VERSION_MINOR 125
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MINOR 126
+#define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \
 #ifndef FF_API_DEBUG_MV
 #define FF_API_DEBUG_MV          (LIBAVCODEC_VERSION_MAJOR < 60)
 #endif
+#ifndef FF_API_GET_FRAME_CLASS
+#define FF_API_GET_FRAME_CLASS     (LIBAVCODEC_VERSION_MAJOR < 60)
+#endif
 
 #endif /* AVCODEC_VERSION_H */