diff options
author | He Junyan <junyan.he@intel.com> | 2021-07-29 18:05:35 +0800 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-07-29 20:28:20 +0000 |
commit | 42ed4c85fc42aef87e9d78a08dfc0bdcdecb513c (patch) | |
tree | 3cfe6cd47a5ce580fc1a622f092eb310a89291e6 | |
parent | 554855f87fca8acd9b18c5374bd2cbaff61d8dc5 (diff) | |
download | gstreamer-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.c | 2 |
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 */ |