va: vp8: fix the overflow in _fill_quant_matrix().

The gint8 of qi and qi_base may overflow when calculation the matrix
parameters and change the decoding result.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2447>
This commit is contained in:
He Junyan 2021-07-29 18:05:35 +08:00 committed by GStreamer Marge Bot
parent 554855f87f
commit 42ed4c85fc

View file

@ -227,7 +227,7 @@ _fill_quant_matrix (GstVp8Decoder * decoder, GstVp8Picture * picture,
GstVp8Segmentation *const seg = &parser->segmentation;
VAIQMatrixBufferVP8 iq_matrix = { };
const gint8 QI_MAX = 127;
gint8 qi, qi_base;
gint16 qi, qi_base;
gint i;
/* Fill in VAIQMatrixBufferVP8 */