diff options
author | James Almer <jamrial@gmail.com> | 2023-04-12 13:58:54 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-05-04 18:48:22 -0300 |
commit | dc7bd7c5a5ad5ea800dfb63cc5dd15670d065527 (patch) | |
tree | 91cd3a4ae8b34601f34ff98aa4beb1ac1b5b28c2 /libavcodec/dxa.c | |
parent | cc11191fda0471017b03c1434d6d8cb79f6914e5 (diff) |
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/dxa.c')
-rw-r--r-- | libavcodec/dxa.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c index 8d2d2d771b..ecb48c9d3f 100644 --- a/libavcodec/dxa.c +++ b/libavcodec/dxa.c @@ -258,19 +258,19 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, switch(compr){ case -1: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (c->prev->data[0]) memcpy(frame->data[0], c->prev->data[0], frame->linesize[0] * avctx->height); else{ // Should happen only when first frame is 'NULL' memset(frame->data[0], 0, frame->linesize[0] * avctx->height); - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; } break; case 2: case 4: - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_I; for (j = 0; j < avctx->height; j++) { memcpy(outptr, srcptr, avctx->width); @@ -285,7 +285,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (!(avctx->flags2 & AV_CODEC_FLAG2_SHOW_ALL)) return AVERROR_INVALIDDATA; } - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; for (j = 0; j < avctx->height; j++) { if(tmpptr){ @@ -300,7 +300,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, break; case 12: // ScummVM coding case 13: - frame->key_frame = 0; + frame->flags &= ~AV_FRAME_FLAG_KEY; frame->pict_type = AV_PICTURE_TYPE_P; if (!c->prev->data[0]) { av_log(avctx, AV_LOG_ERROR, "Missing reference frame\n"); |