Commit 0821bc4e authored by Aman Gupta's avatar Aman Gupta

avcodec/vaapi_encode: respect -force_key_frames setting

This was a regression in 5fdcf85bSigned-off-by: 's avatarAman Gupta <aman@tmm1.net>
Signed-off-by: 's avatarMark Thompson <sw@jkqxz.net>
parent 02a44ed0
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment