summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-09-27 19:08:42 +0100
committerMark Thompson <sw@jkqxz.net>2016-11-21 22:13:41 +0000
commitee1d04f970b0297953a6b547f615297f1343654f (patch)
treef2cc60fdec7adadb8ecd599ff35d335ded577022 /libavcodec
parent94f446c628bb885561eb028b0b01362e02ab67f5 (diff)
vaapi_h264: Set max_num_ref_frames to 1 when not using B frames
(cherry picked from commit 956a54129db522998a5abae869568dae2c9774cb)
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vaapi_encode_h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index 9bcdc04d20..02836b0cf6 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -778,7 +778,7 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
vseq->level_idc = avctx->level;
- vseq->max_num_ref_frames = 2;
+ vseq->max_num_ref_frames = 1 + (avctx->max_b_frames > 0);
vseq->picture_width_in_mbs = priv->mb_width;
vseq->picture_height_in_mbs = priv->mb_height;