On Fri, Nov 20, 2020 at 08:33:08AM +0100, Andreas Rheinhardt wrote:
> 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 one AVOnce.
> This also avoids unnecessary duplications of the init code.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com>
> ---
>  libavcodec/aacenc.c | 12 +----------
>  libavcodec/aactab.c | 52 +++++++++++++++++++++++++++++++++++++++++++++
>  libavcodec/aactab.h | 46 +--------------------------------------
>  3 files changed, 54 insertions(+), 56 deletions(-)

LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to