From 2f31b73a11d676e3f7f66139ff5c745317e8f1a3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 24 Oct 2013 01:18:37 +0200 Subject: [PATCH] avcodec/mpegaudio_tablegen: fix build with hardcoded tables Signed-off-by: Michael Niedermayer --- libavcodec/mpegaudio_tablegen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpegaudio_tablegen.h b/libavcodec/mpegaudio_tablegen.h index 5592b4aceb..f9557c9ae1 100644 --- a/libavcodec/mpegaudio_tablegen.h +++ b/libavcodec/mpegaudio_tablegen.h @@ -63,7 +63,7 @@ static void mpegaudio_tableinit(void) /* cbrtf() isn't available on all systems, so we use powf(). */ double f = (double)value * pow(value, 1.0 / 3.0) * pow(2, (exponent - 400) * 0.25 + FRAC_BITS + 5) / IMDCT_SCALAR; /* llrint() isn't always available, so round and cast manually. */ - expval_table_fixed[exponent][value] = (long long int) FFMIN(floor(f + 0.5), 0xFFFFFFFF); + expval_table_fixed[exponent][value] = (long long int) (f < 0xFFFFFFFF ? floor(f + 0.5) : 0xFFFFFFFF); expval_table_float[exponent][value] = f; } exp_table_fixed[exponent] = expval_table_fixed[exponent][1];