diff options
author | James Almer <jamrial@gmail.com> | 2023-04-12 20:07:01 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-05-04 19:20:03 -0300 |
commit | 3e06f6f04020bef32fa42bc9d7f96e76a46453aa (patch) | |
tree | 3cb4509342f7f7fcbc5c0cf20faf4fc3f90202e8 /libavcodec | |
parent | c7a8681860d68f3ad00ef49215dbfda52c71c90b (diff) | |
download | ffmpeg-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.c | 4 | ||||
-rw-r--r-- | libavcodec/encode.c | 4 |
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) |