VideoCapture Constructor concurrency bug (Bug #1006)

Added by Josh Klontz almost 6 years ago. Updated over 4 years ago.

Status:Cancelled Start date:
Priority:High Due date:
Assignee:Alexander Shishkov % Done:


Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:


Platform: Win32-MinGW
OpenCV Version: 2.2

Calling the constructor 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 or making a note of it in the documentation.


Related issues

duplicates Bugfix #1369: Multi-threaded FFMPEG accesses crash Done


Updated by Alexander Shishkov about 5 years ago

  • Description changed from Platform: Win32-MinGW [[OpenCV]] Version: 2.2 Calling the constructor [[Vide... to Platform: Win32-MinGW OpenCV Version: 2.2 Calling the constructor VideoCaptu... More

Updated by Alexander Shishkov almost 5 years ago

Duplicate of #1369

  • Status changed from Open to Cancelled

Updated by Andrey Kamaev almost 5 years ago

  • Target version set to 2.4.0
  • Assignee set to Alexander Shishkov

Updated by Andrey Kamaev over 4 years ago

  • Category changed from highgui-images to highgui-video

Also available in: Atom PDF