Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/g723_1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index aabb03d447..e917f5a50c 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -290,6 +290,7 @@ static int scale_vector(int16_t *vector, int length)
for (i = 0; i < length; i++)
max = FFMAX(max, FFABS(vector[i]));
+ max = FFMIN(max, 0x7FFF);
bits = normalize_bits(max, 15);
scale = (bits == 15) ? 0x7FFF : (1 << bits);