summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2021-07-29 18:05:35 +0800
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-07-29 20:28:20 +0000
commit42ed4c85fc42aef87e9d78a08dfc0bdcdecb513c (patch)
tree3cfe6cd47a5ce580fc1a622f092eb310a89291e6
parent554855f87fca8acd9b18c5374bd2cbaff61d8dc5 (diff)
downloadgstreamer-plugins-bad-42ed4c85fc42aef87e9d78a08dfc0bdcdecb513c.tar.gz
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>
-rw-r--r--sys/va/gstvavp8dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/va/gstvavp8dec.c b/sys/va/gstvavp8dec.c
index c3a639424..997dc645b 100644
--- a/sys/va/gstvavp8dec.c
+++ b/sys/va/gstvavp8dec.c
@@ -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 */