aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-02-25 17:30:28 -0300
committerJames Almer <jamrial@gmail.com>2021-02-27 11:23:42 -0300
commitdd9227e48f360c0f498af0786ce9544c61996843 (patch)
tree49335a68dadbd4d9455bfec0d9bf224a9dcd53f9
parent0c902a61471a2f45e1c7159bd77146d2b499abb3 (diff)
downloadffmpeg-dd9227e48f360c0f498af0786ce9544c61996843.tar.gz
avcodec/options: deprecate avcodec_get_frame_class()
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>
-rw-r--r--doc/APIchanges3
-rw-r--r--libavcodec/avcodec.h8
-rw-r--r--libavcodec/options.c2
-rw-r--r--libavcodec/version.h7
4 files changed, 14 insertions, 6 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index 33be750af2..a49e181c13 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -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
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 3178c163b9..cd6e6d19bc 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -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
diff --git a/libavcodec/options.c b/libavcodec/options.c
index ff16e2cbfd..6e904b61d8 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -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)
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 516411b4b2..f4715063c0 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -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, \
@@ -153,5 +153,8 @@
#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 */