summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2019-08-07 10:20:51 -0700
committerAman Gupta <aman@tmm1.net>2019-08-26 16:09:11 -0700
commit0821bc4eee25909736efe90616e8afca942c00d5 (patch)
tree36590c5451833cd7d6e077d973a5fe42c9747c0f
parent02a44ed0c8022da6c9c5bab7e5fb734dccefe587 (diff)
avcodec/vaapi_encode: respect -force_key_frames setting
This was a regression in 5fdcf85bbffe7451c227478fda62da5c0938f27d Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Mark Thompson <sw@jkqxz.net>
-rw-r--r--libavcodec/vaapi_encode.c2
1 files changed, 1 insertions, 1 deletions
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];