]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/mpegaudio_tablegen: Don't inappropriately use static array
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 17 Nov 2020 22:42:58 +0000 (23:42 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 8 Dec 2020 16:51:47 +0000 (17:51 +0100)
Each invocation of this function is only entered once, so using a static
array makes no sense (and given that the whole array is reinitialized at
the beginning of this function, it wouldn't even make sense if the
function were called multiple times).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/mpegaudio_tablegen.h

index dcc09e37b8730220297fda244c52e4a2114e0551..d9e32b54da7bad9a4ec917e3e1e49362a95edda8 100644 (file)
@@ -59,7 +59,7 @@ static av_cold void mpegaudio_tableinit(void)
         M_SQRT2               , /* 2 ^ (2 * 0.25) */
         1.68179283050742908606, /* 2 ^ (3 * 0.25) */
     };
-    static double pow43_lut[16];
+    double pow43_lut[16];
     double exp2_base = 2.11758236813575084767080625169910490512847900390625e-22; // 2^(-72)
     double exp2_val;
     double pow43_val = 0;