avcodec/mpegvideo_dec: properly set output frames as keyframes

Should fix ticket #10426.

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2023-07-14 09:31:32 -03:00
parent c183f840fa
commit e047d9c62b
1 changed files with 2 additions and 2 deletions

View File

@ -344,9 +344,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->current_picture_ptr->f->pict_type = s->pict_type;
if (s->pict_type == AV_PICTURE_TYPE_I)
s->current_picture.f->flags |= AV_FRAME_FLAG_KEY;
s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_KEY;
else
s->current_picture.f->flags &= ~AV_FRAME_FLAG_KEY;
s->current_picture_ptr->f->flags &= ~AV_FRAME_FLAG_KEY;
if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture,
s->current_picture_ptr)) < 0)