summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_encode_h264.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-09-18 23:30:47 +0100
committerMark Thompson <sw@jkqxz.net>2018-09-23 14:42:33 +0100
commitbf726c26fde26601a90daacf1b10a9860d21321c (patch)
tree9ed0e2a816515ea53a488410333c86f18e522e1f /libavcodec/vaapi_encode_h264.c
parent8479f99c7dd227d9cb94d262602f1298f71cf33b (diff)
downloadffmpeg-bf726c26fde26601a90daacf1b10a9860d21321c.tar.gz
vaapi_encode: Clean up the GOP structure configuration
Choose what types of reference frames will be used based on what types are available, and make the intra-only mode explicit (GOP size one, which must be used for MJPEG).
Diffstat (limited to 'libavcodec/vaapi_encode_h264.c')
-rw-r--r--libavcodec/vaapi_encode_h264.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index e903b251c0..5c93fe35ce 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -493,8 +493,8 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
*vseq = (VAEncSequenceParameterBufferH264) {
.seq_parameter_set_id = sps->seq_parameter_set_id,
.level_idc = sps->level_idc,
- .intra_period = avctx->gop_size,
- .intra_idr_period = avctx->gop_size,
+ .intra_period = ctx->gop_size,
+ .intra_idr_period = ctx->gop_size,
.ip_period = ctx->b_per_p + 1,
.bits_per_second = ctx->va_bit_rate,