From d14bdbd0f324e6e19085cd47b0ffcde1a85f365d Mon Sep 17 00:00:00 2001 From: simon987 Date: Fri, 27 Dec 2019 16:23:03 -0500 Subject: [PATCH] bugfix: fftw thread safety --- fastimagehash.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fastimagehash.cpp b/fastimagehash.cpp index a21a1c6..cedf9b8 100644 --- a/fastimagehash.cpp +++ b/fastimagehash.cpp @@ -11,6 +11,11 @@ //TODO: Error handling +static void init() __attribute__((constructor)); +void init() { + fftw_make_planner_thread_safe(); +} + using namespace cv; #define FASTIMAGEHASH_OK 0