mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user