diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-02 00:10:13 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-10 01:36:16 +0100 |
commit | 6a94afbd5bf4aa3ccab12f038e8bbae7ef3973c0 (patch) | |
tree | b4ae496edfcbeb083e928f7cb9c5c4c00bd7c7c8 /libavformat/latmenc.c | |
parent | bdfe51b44f01de89f794a307f0a59941bc0ec9fa (diff) | |
download | ffmpeg-6a94afbd5bf4aa3ccab12f038e8bbae7ef3973c0.tar.gz |
avcodec/snow: Use ff_thread_once() in ff_snow_common_init()
ff_snow_common_init() currently initializes static data every time it is
invoked; given that both the Snow encoder and decoder have the
FF_CODEC_CAP_INIT_THREADSAFE flag set, this can lead to data races (and
therefore undefined behaviour) even though all threads write the same
values. This commit fixes this by using ff_thread_once() for the
initializations.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/latmenc.c')
0 files changed, 0 insertions, 0 deletions