]> git.sesse.net Git - ffmpeg/commit
avcodec/mpegaudiodsp: Make ff_mpadsp_init() thread-safe
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 15 Nov 2020 15:01:49 +0000 (16:01 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 24 Nov 2020 10:35:03 +0000 (11:35 +0100)
commitead313415037bbb94954a346a17796c0f741f790
treee03a09505d2d8e6987513cbff460819376e9f221
parentb9c1ab89078d862e0146c9d7ed277addd770e3a3
avcodec/mpegaudiodsp: Make ff_mpadsp_init() thread-safe

The only thing missing for this is to make ff_mpadsp_init_x86()
thread-safe; it currently isn't because a static table is initialized
every time ff_mpadsp_init() is called (when ARCH_X86 is true). Solve
this by initializing this table only once, namely together with the
ordinary not-arch specific tables. This also allows to reuse their AVOnce.

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