libs: encoder: vp9: Fix initialization of ref_list

gcc 7.0.1 gives a memset-elt-size warning in gst_vaapi_encoder_vp9_init:

 'memset' used with length equal to number of elements without
 multiplication by element size [-Werror=memset-elt-size]

https://bugzilla.gnome.org/show_bug.cgi?id=780947
This commit is contained in:
Scott D Phillips 2017-04-05 11:15:41 -07:00 committed by Víctor Manuel Jáquez Leal
parent be990f5ed4
commit 123672a9bd

View file

@ -440,7 +440,8 @@ gst_vaapi_encoder_vp9_init (GstVaapiEncoder * base_encoder)
encoder->sharpness_level = DEFAULT_SHARPNESS_LEVEL; encoder->sharpness_level = DEFAULT_SHARPNESS_LEVEL;
encoder->yac_qi = DEFAULT_YAC_QINDEX; encoder->yac_qi = DEFAULT_YAC_QINDEX;
memset (encoder->ref_list, 0, G_N_ELEMENTS (encoder->ref_list)); memset (encoder->ref_list, 0,
G_N_ELEMENTS (encoder->ref_list) * sizeof (encoder->ref_list[0]));
encoder->ref_list_idx = 0; encoder->ref_list_idx = 0;
return TRUE; return TRUE;