summaryrefslogtreecommitdiff
path: root/libavcodec/qdm2_tablegen.h
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-10-11 17:45:55 +0100
committerMans Rullgard <mans@mansr.com>2011-10-12 12:28:08 +0100
commitc682514a8f17a886f31c5aa0bba78c4f260fbfcf (patch)
tree9e38d10dfbae7a9c4a3a026d5e556587a8966fc3 /libavcodec/qdm2_tablegen.h
parent5e87222fd1dd57483c2a566e6643ca601b0e4e0c (diff)
qdm2: fix signed multiplication overflow
This code relies on the result wrapping as for unsigned values, and the sign is not used. Thus an unsigned type is proper here. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/qdm2_tablegen.h')
-rw-r--r--libavcodec/qdm2_tablegen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qdm2_tablegen.h b/libavcodec/qdm2_tablegen.h
index b2bb294f58..bb73d92531 100644
--- a/libavcodec/qdm2_tablegen.h
+++ b/libavcodec/qdm2_tablegen.h
@@ -90,7 +90,7 @@ static av_cold void rnd_table_init(void) {
static av_cold void init_noise_samples(void) {
int i;
- int random_seed = 0;
+ unsigned random_seed = 0;
float delta = 1.0 / 16384.0;
for (i = 0; i < 128;i++) {
random_seed = random_seed * 214013 + 2531011;