vaapi_encode_vp8: memset the the structure to 0
authorHaihao Xiang <haihao.xiang@intel.com>
Fri, 4 May 2018 14:41:07 +0000 (22:41 +0800)
committerMark Thompson <sw@jkqxz.net>
Mon, 7 May 2018 20:32:47 +0000 (21:32 +0100)
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@intel.com>
libavcodec/vaapi_encode_vp8.c

index b4c5521..a2e861a 100644 (file)
@@ -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