[FFmpeg-devel] [PATCH 3/3] vaapi_encode_vp8: memset the the structure to 0
Haihao Xiang
haihao.xiang at intel.com
Fri May 4 17:41:07 EEST 2018
The structure has reserved bytes, it is required to set the reserved
bytes to 0 for future use.
Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>
---
libavcodec/vaapi_encode_vp8.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/vaapi_encode_vp8.c b/libavcodec/vaapi_encode_vp8.c
index b4c5521d1f..a2e861a8d1 100644
--- a/libavcodec/vaapi_encode_vp8.c
+++ b/libavcodec/vaapi_encode_vp8.c
@@ -143,6 +143,8 @@ static int vaapi_encode_vp8_write_quant_table(AVCodecContext *avctx,
*type = VAQMatrixBufferType;
*data_len = sizeof(quant);
+ memset(&quant, 0, sizeof(quant));
+
if (pic->type == PICTURE_TYPE_P)
q = priv->q_index_p;
else
--
2.17.0
More information about the ffmpeg-devel
mailing list