diff mbox series

[FFmpeg-devel,v2,160/162] avcodec/mpegaudio_tablegen: Don't inappropriately use static array

Message ID 20201120073327.820745-61-andreas.rheinhardt@gmail.com
State Accepted
Commit 12e941df89aa0e2aa8c6b90bfef9d4127ae7063c
Headers show
Series VLC, esp. init_vlc patches | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 20, 2020, 7:33 a.m. UTC
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/mpegaudio_tablegen.h b/libavcodec/mpegaudio_tablegen.h
index c78d5b5d7c..1a92bb4de6 100644
--- a/libavcodec/mpegaudio_tablegen.h
+++ b/libavcodec/mpegaudio_tablegen.h
@@ -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;