Add a lock manager API to libavcodec.