aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-09-30 17:47:19 +0200
committerMark Thompson <sw@jkqxz.net>2016-11-21 22:13:41 +0000
commit30ebabca7c3a2cea1cb871563f6097f3619c8be9 (patch)
tree928afedd7a7415e8d155e2ebe0238ddd5c75e80e /libavcodec
parentae0230cc3e249971e7fe7747a12931bde71f9a11 (diff)
downloadffmpeg-30ebabca7c3a2cea1cb871563f6097f3619c8be9.tar.gz
vaapi_h265: Fix buffering parameters
A decoder may need this to be set correctly to output frames in the right order. (cherry picked from commit b8cac1e83066aa87e8402c146c81b77a11b5eec3)
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vaapi_encode_h265.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c
index 576616b71c..48a1af8787 100644
--- a/libavcodec/vaapi_encode_h265.c
+++ b/libavcodec/vaapi_encode_h265.c
@@ -897,12 +897,12 @@ static int vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx)
mseq->log2_max_pic_order_cnt_lsb_minus4 = 8;
mseq->vps_sub_layer_ordering_info_present_flag = 0;
- mseq->vps_max_dec_pic_buffering_minus1[0] = 1;
- mseq->vps_max_num_reorder_pics[0] = ctx->b_per_p;
+ mseq->vps_max_dec_pic_buffering_minus1[0] = (avctx->max_b_frames > 0) + 1;
+ mseq->vps_max_num_reorder_pics[0] = (avctx->max_b_frames > 0);
mseq->vps_max_latency_increase_plus1[0] = 0;
mseq->sps_sub_layer_ordering_info_present_flag = 0;
- mseq->sps_max_dec_pic_buffering_minus1[0] = 1;
- mseq->sps_max_num_reorder_pics[0] = ctx->b_per_p;
+ mseq->sps_max_dec_pic_buffering_minus1[0] = (avctx->max_b_frames > 0) + 1;
+ mseq->sps_max_num_reorder_pics[0] = (avctx->max_b_frames > 0);
mseq->sps_max_latency_increase_plus1[0] = 0;
mseq->vps_timing_info_present_flag = 1;