[FFmpeg-cvslog] avcodec/vaapi_encode: respect -force_key_frames setting

Aman Gupta git at videolan.org
Tue Aug 27 02:09:53 EEST 2019


ffmpeg | branch: master | Aman Gupta <aman at tmm1.net> | Wed Aug  7 10:20:51 2019 -0700| [0821bc4eee25909736efe90616e8afca942c00d5] | committer: Aman Gupta

avcodec/vaapi_encode: respect -force_key_frames setting

This was a regression in 5fdcf85bbffe7451c227478fda62da5c0938f27d

Signed-off-by: Aman Gupta <aman at tmm1.net>
Signed-off-by: Mark Thompson <sw at jkqxz.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0821bc4eee25909736efe90616e8afca942c00d5
---

 libavcodec/vaapi_encode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
index e69b59fa37..2fb43cf1a4 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -1057,7 +1057,7 @@ int ff_vaapi_encode_send_frame(AVCodecContext *avctx, const AVFrame *frame)
         if (err < 0)
             goto fail;
 
-        if (ctx->input_order == 0)
+        if (ctx->input_order == 0 || frame->pict_type == AV_PICTURE_TYPE_I)
             pic->force_idr = 1;
 
         pic->input_surface = (VASurfaceID)(uintptr_t)frame->data[3];



More information about the ffmpeg-cvslog mailing list