avcodec/vaapi_encode: respect -force_key_frames setting

This was a regression in 5fdcf85bbf

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
pull/321/head^2
Aman Gupta 5 years ago
parent 02a44ed0c8
commit 0821bc4eee
  1. 2
      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];

Loading…
Cancel
Save