From 921780c48015376d69b92d24584d00cd2c54b1b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Falgueras=20Garc=C3=ADa?= Date: Fri, 25 Feb 2022 15:01:28 +0100 Subject: [PATCH] avcenc: Use the appropriate size for VAEncMiscParameterHRD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This buffer's size should the one of the VAEncMiscParameterHRD structure, not the VAEncMiscParameterRateControl. Signed-off-by: Carlos Falgueras GarcĂ­a --- encode/avcenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encode/avcenc.c b/encode/avcenc.c index 3eecd205..7c4c8178 100644 --- a/encode/avcenc.c +++ b/encode/avcenc.c @@ -851,7 +851,7 @@ static int begin_picture(FILE *yuv_fp, int frame_num, int display_num, int slice vaCreateBuffer(va_dpy, avcenc_context.context_id, VAEncMiscParameterBufferType, - sizeof(VAEncMiscParameterBuffer) + sizeof(VAEncMiscParameterRateControl), + sizeof(VAEncMiscParameterBuffer) + sizeof(VAEncMiscParameterHRD), 1, NULL, &avcenc_context.misc_parameter_hrd_buf_id);