[FFmpeg-devel] [PATCH V2] lavc/vaapi_encode_h264: correct VUI max_dec_frame_buffering setting.

Jun Zhao mypopydev at gmail.com
Tue Oct 24 09:02:32 EEST 2017


-------------- next part --------------
From 24b8e1c70fd4bf4eb76404fd9e2020fe3bbd90cb Mon Sep 17 00:00:00 2001
From: Jun Zhao <jun.zhao at intel.com>
Date: Tue, 24 Oct 2017 13:25:21 +0800
Subject: [PATCH V2] lavc/vaapi_encode_h264: correct VUI
 max_dec_frame_buffering setting.

vseq.max_num_ref_frames not init before the VUI
max_dec_frame_buffering setting, so use sps.max_num_ref_frames
in this case.

Signed-off-by: Jun Zhao <jun.zhao at intel.com>
Signed-off-by: Wang, Yi A <yi.a.wang at intel.com>
---
 libavcodec/vaapi_encode_h264.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index 9a4bd53da1..1d43e934ef 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -441,7 +441,7 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
     sps->vui.log2_max_mv_length_horizontal = 16;
     sps->vui.log2_max_mv_length_vertical   = 16;
     sps->vui.max_num_reorder_frames        = (ctx->b_per_p > 0);
-    sps->vui.max_dec_frame_buffering       = vseq->max_num_ref_frames;
+    sps->vui.max_dec_frame_buffering       = sps->max_num_ref_frames;
 
     pps->nal_unit_header.nal_ref_idc = 3;
     pps->nal_unit_header.nal_unit_type = H264_NAL_PPS;
-- 
2.14.1



More information about the ffmpeg-devel mailing list