From 0821bc4eee25909736efe90616e8afca942c00d5 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Wed, 7 Aug 2019 10:20:51 -0700 Subject: [PATCH] avcodec/vaapi_encode: respect -force_key_frames setting This was a regression in 5fdcf85bbffe7451c227478fda62da5c0938f27d Signed-off-by: Aman Gupta Signed-off-by: Mark Thompson --- 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];