avcodec/vorbisdec: don't use double intermediate in vorbisfloat2float

Signed-off-by: James Almer <jamrial@gmail.com>
release/7.1
James Almer 7 months ago
parent 1b9af306da
commit 08383443ff
  1. 6
      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);
}

Loading…
Cancel
Save