-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library FFTW's fftw_plan_dft_r2c_1d is not thread safe. #743
Comments
The way the framework is typically used (through a consumer based on mlt_consumer), this function is only called from one thread. If an app is going to read frames directly from a producer as we discussed on the forum, then it can do something to ensure only one thread is performing this task. That does not completely solve the case when the framework consumer is running and the app chooses to do something with the filter. We can add a mutex in the filter, or the app can stop the MLT consumer when it wants to run its task - perhaps in a manner to block restarting it such as from a modal dialog. |
The only thread-safe function in FFTW is
fftw_execute
.But the FFT filter calls
fftw_plan_dft_r2c_1d
. This makes MLT non-thread safe.One solution for this problem is making programs linking to MLT call
void fftw_make_planner_thread_safe(void);
. Maybe, through some initialization method.The text was updated successfully, but these errors were encountered: