[FFmpeg-devel] [PATCH] avcodec/mpegvideo_dec: properly set output frames as keyframes

James Almer jamrial at gmail.com
Fri Jul 14 15:31:32 EEST 2023


Should fix ticket #10426.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/mpegvideo_dec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c
index fcca147cd6..670b0912e2 100644
--- a/libavcodec/mpegvideo_dec.c
+++ b/libavcodec/mpegvideo_dec.c
@@ -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)
-- 
2.41.0



More information about the ffmpeg-devel mailing list