aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-04-12 20:07:01 -0300
committerJames Almer <jamrial@gmail.com>2023-05-04 19:20:03 -0300
commit3e06f6f04020bef32fa42bc9d7f96e76a46453aa (patch)
tree3cb4509342f7f7fcbc5c0cf20faf4fc3f90202e8 /libavcodec
parentc7a8681860d68f3ad00ef49215dbfda52c71c90b (diff)
downloadffmpeg-3e06f6f04020bef32fa42bc9d7f96e76a46453aa.tar.gz
avutil/frame: deprecate key_frame
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/decode.c4
-rw-r--r--libavcodec/encode.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index a5a6209eae..4f2359f07e 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -572,7 +572,11 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
if (!ret) {
if (avctx->codec_type != AVMEDIA_TYPE_VIDEO)
frame->flags |= AV_FRAME_FLAG_KEY;
+#if FF_API_FRAME_KEY
+FF_DISABLE_DEPRECATION_WARNINGS
frame->key_frame = !!(frame->flags & AV_FRAME_FLAG_KEY);
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
#if FF_API_INTERLACED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
frame->interlaced_frame = !!(frame->flags & AV_FRAME_FLAG_INTERLACED);
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 04ee59879e..14e2876742 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -192,8 +192,12 @@ int ff_encode_get_frame(AVCodecContext *avctx, AVFrame *frame)
av_frame_move_ref(frame, avci->buffer_frame);
+#if FF_API_FRAME_KEY
+FF_DISABLE_DEPRECATION_WARNINGS
if (frame->key_frame)
frame->flags |= AV_FRAME_FLAG_KEY;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
#if FF_API_INTERLACED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
if (frame->interlaced_frame)