summaryrefslogtreecommitdiff
path: root/libavcodec/qsvdec.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-04-12 13:58:54 -0300
committerJames Almer <jamrial@gmail.com>2023-05-04 18:48:22 -0300
commitdc7bd7c5a5ad5ea800dfb63cc5dd15670d065527 (patch)
tree91cd3a4ae8b34601f34ff98aa4beb1ac1b5b28c2 /libavcodec/qsvdec.c
parentcc11191fda0471017b03c1434d6d8cb79f6914e5 (diff)
downloadffmpeg-dc7bd7c5a5ad5ea800dfb63cc5dd15670d065527.tar.gz
avcodec: use the new AVFrame key_frame flag in all decoders and encoders
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r--libavcodec/qsvdec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index e137a38e3c..da700f25e9 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -834,8 +834,12 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
!(outsurf->Info.PicStruct & MFX_PICSTRUCT_PROGRESSIVE);
frame->pict_type = ff_qsv_map_pictype(aframe.frame->dec_info.FrameType);
//Key frame is IDR frame is only suitable for H264. For HEVC, IRAPs are key frames.
- if (avctx->codec_id == AV_CODEC_ID_H264)
- frame->key_frame = !!(aframe.frame->dec_info.FrameType & MFX_FRAMETYPE_IDR);
+ if (avctx->codec_id == AV_CODEC_ID_H264) {
+ if (aframe.frame->dec_info.FrameType & MFX_FRAMETYPE_IDR)
+ frame->flags |= AV_FRAME_FLAG_KEY;
+ else
+ frame->flags &= ~AV_FRAME_FLAG_KEY;
+ }
/* update the surface properties */
if (avctx->pix_fmt == AV_PIX_FMT_QSV)