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

@@ -310,7 +310,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if (chunk_type == kVGT_TAG) {
int y;
frame->key_frame = 1;
frame->flags |= AV_FRAME_FLAG_KEY;
frame->pict_type = AV_PICTURE_TYPE_I;
if (!s->frame_buffer &&
@@ -330,7 +330,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame,
av_log(avctx, AV_LOG_WARNING, "inter frame without corresponding intra frame\n");
return buf_size;
}
frame->key_frame = 0;
frame->flags &= ~AV_FRAME_FLAG_KEY;
frame->pict_type = AV_PICTURE_TYPE_P;
if (tgv_decode_inter(s, frame, buf, buf_end) < 0) {
av_log(avctx, AV_LOG_WARNING, "truncated inter frame\n");