[FFmpeg-cvslog] avcodec/options: add missing FF_API_COPY_CONTEXT checks

James Almer git at videolan.org
Fri Oct 2 06:36:20 EEST 2020


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Oct  1 22:43:03 2020 -0300| [0191f2d29c2a62b8699ac75f09708187e943814c] | committer: James Almer

avcodec/options: add missing FF_API_COPY_CONTEXT checks

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0191f2d29c2a62b8699ac75f09708187e943814c
---

 libavcodec/options.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index ff16e2cbfd..4bbf74ec7f 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -327,6 +327,7 @@ static const AVOption frame_options[]={
 {NULL},
 };
 
+#if FF_API_COPY_CONTEXT
 static const AVClass av_frame_class = {
     .class_name              = "AVFrame",
     .item_name               = NULL,
@@ -338,6 +339,7 @@ const AVClass *avcodec_get_frame_class(void)
 {
     return &av_frame_class;
 }
+#endif
 
 #define SROFFSET(x) offsetof(AVSubtitleRect,x)
 
@@ -352,6 +354,7 @@ static const AVOption subtitle_rect_options[]={
 {NULL},
 };
 
+#if FF_API_COPY_CONTEXT
 static const AVClass av_subtitle_rect_class = {
     .class_name             = "AVSubtitleRect",
     .item_name              = NULL,
@@ -363,3 +366,4 @@ const AVClass *avcodec_get_subtitle_rect_class(void)
 {
     return &av_subtitle_rect_class;
 }
+#endif



More information about the ffmpeg-cvslog mailing list