summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/alsdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 8201deb366..6b5774175b 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1416,7 +1416,7 @@ static SoftFloat_IEEE754 multiply(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) {
return_val = 0x80000000U;
}
- return_val |= (a.exp + b.exp + bit_count - 47) << 23;
+ return_val |= ((unsigned)av_clip(a.exp + b.exp + bit_count - 47, -126, 127) << 23) & 0x7F800000;
return_val |= mantissa;
return av_bits2sf_ieee754(return_val);
}