avcodec: use the new AVFrame key_frame flag in all decoders and encoders

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2023-04-12 13:58:54 -03:00
parent cc11191fda
commit dc7bd7c5a5
160 changed files with 371 additions and 243 deletions

View File

@@ -570,6 +570,9 @@ 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;
frame->key_frame = !!(frame->flags & AV_FRAME_FLAG_KEY);
#if FF_API_INTERLACED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
frame->interlaced_frame = !!(frame->flags & AV_FRAME_FLAG_INTERLACED);