aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-06-11 22:50:50 -0300
committerJames Almer <jamrial@gmail.com>2024-06-13 20:36:09 -0300
commit08383443ff695816297f94775ab793159ff38422 (patch)
tree35bb424961d9abc0841aa849ccb5d1a84890d8ce
parent1b9af306da36a9e5b2e786b07cad50c5ba8c203f (diff)
downloadffmpeg-08383443ff695816297f94775ab793159ff38422.tar.gz
avcodec/vorbisdec: don't use double intermediate in vorbisfloat2float
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/vorbisdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 700c6c8918..218e855f7a 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -181,11 +181,11 @@ static const char idx_err_str[] = "Index value %d out of range (0 - %d) for %s a
static float vorbisfloat2float(unsigned val)
{
- double mant = val & 0x1fffff;
- long exp = (val & 0x7fe00000L) >> 21;
+ float mant = val & 0x1fffff;
+ int exp = (val & 0x7fe00000) >> 21;
if (val & 0x80000000)
mant = -mant;
- return ldexp(mant, exp - 20 - 768);
+ return ldexpf(mant, exp - 20 - 768);
}