]> git.sesse.net Git - vlc/commit
avutil: vector and serialize CPU flags initialization
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 22 Feb 2014 17:03:22 +0000 (19:03 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 22 Feb 2014 17:07:39 +0000 (19:07 +0200)
commitcac559118ec6bbbef12ac84d9310e7391978c2ca
treea97f3570d8f7e40c03edd6f87100ece1840a4a1d
parentdf4c7f8c0072e8aaac0e47f4eff70f8476fc3df8
avutil: vector and serialize CPU flags initialization

av_set_cpu_flags_mask() is not thread-safe. So are the first call to
av_get_cpu_flags() after loading libavutil, and the first call to
av_get_cpu_flags() after a call to av_set_cpu_flags_mask(). So call
those under the avcodec lock during initialization.
modules/codec/avcodec/avcodec.c
modules/codec/avcodec/avcommon.h
modules/codec/avcodec/encoder.c