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.
Showing with 9 additions and 13 deletions