You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avutil/softfloat: Check for MIN_EXP in av_sqrt_sf()
Otherwise the exponent could eventually underflow Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -181,6 +181,10 @@ static av_always_inline SoftFloat av_sqrt_sf(SoftFloat val)
|
|||||||
val.mant >>= 1;
|
val.mant >>= 1;
|
||||||
|
|
||||||
val.exp = (val.exp >> 1) + 1;
|
val.exp = (val.exp >> 1) + 1;
|
||||||
|
if (val.exp < MIN_EXP) {
|
||||||
|
val.exp = MIN_EXP;
|
||||||
|
val.mant= 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
|
Reference in New Issue
Block a user