diff mbox series

[FFmpeg-devel,v3,1/5] avcodec/evc: Set the AV_FRAME_FLAG_KEY flag for a decoded frame when the decoded packet contains a keyframe

Message ID 20240418105308.1535-1-d.kozinski@samsung.com
State New
Headers show
Series [FFmpeg-devel,v3,1/5] avcodec/evc: Set the AV_FRAME_FLAG_KEY flag for a decoded frame when the decoded packet contains a keyframe | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
---
 libavcodec/libxevd.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c
index c6c7327e65..de641d85f4 100644
--- a/libavcodec/libxevd.c
+++ b/libavcodec/libxevd.c
@@ -415,6 +415,10 @@  static int libxevd_receive_frame(AVCodecContext *avctx, AVFrame *frame)
                             return  AVERROR(EAGAIN);
                         }
                     } else {
+                        if (stat.stype == XEVD_ST_I) { 
+                            frame->pict_type = AV_PICTURE_TYPE_I;
+                            frame->flags |= AV_FRAME_FLAG_KEY;
+                        }
                         return libxevd_return_frame(avctx, frame, imgb, &pkt_au);
                     }
                 }