Updated by Alexander Shishkov about 13 years ago
Platform: Win32-MinGW
OpenCV [[OpenCV]] Version: 2.2
Calling the constructor VideoCapture::VideoCapture(const [[VideoCapture]]::VideoCapture(const string& filename) simultaneously from multiple threads causes ffmpeg to print a bunch of statements to the terminal complaining "insufficient thread locking around avcodec_open/close()" and then crash.
Was able to fix this easily by wrapping the constructor with a global mutex. Might consider doing the same within OpenCV [[OpenCV]] or making a note of it in the documentation.
Thanks!
OpenCV [[OpenCV]] Version: 2.2
Calling the constructor VideoCapture::VideoCapture(const [[VideoCapture]]::VideoCapture(const string& filename) simultaneously from multiple threads causes ffmpeg to print a bunch of statements to the terminal complaining "insufficient thread locking around avcodec_open/close()" and then crash.
Was able to fix this easily by wrapping the constructor with a global mutex. Might consider doing the same within OpenCV [[OpenCV]] or making a note of it in the documentation.
Thanks!