diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-19 16:54:45 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-24 11:35:03 +0100 |
commit | 195d8ce85eb73ff283f85dcee63383ec4081e3e7 (patch) | |
tree | 9e71532be20394daa1fdc4b1e637251ada721d40 /libavcodec/mpeg4video.h | |
parent | c4b4cd775af0f4b83c34fd595c05d2fa99018323 (diff) | |
download | ffmpeg-195d8ce85eb73ff283f85dcee63383ec4081e3e7.tar.gz |
avcodec/aac*: Make initializing ff_aac_pow*sf_tab thread-safe
This table is currently initialized up to three times: Once by the
encoder and twice by the decoders (once by the fixed and once by the
floating-point decoder); each of these initializations is guarded by an
AVOnce, yet the fact that there are three of them implies that there
might be data races (the fact that each entry is only written to once
(to its final value) when initializing means that this is safe in
practice, yet it is still undefined behaviour). Fix this by only
initializing the table from one place that is guarded by a single AVOnce.
This also avoids unnecessary duplications of the init code.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/mpeg4video.h')
0 files changed, 0 insertions, 0 deletions