mirror of https://github.com/FFmpeg/FFmpeg.git
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>pull/358/head
parent
bdfe51b44f
commit
6a94afbd5b
1 changed files with 13 additions and 5 deletions
Loading…
Reference in new issue