VideoCapture Constructor concurrency bug (Bug #1006)


Added by Josh Klontz over 3 years ago. Updated over 2 years ago.


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

0%

Category:highgui-video
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

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.

Thanks!


Related issues (Add)

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

History

Updated by Alexander Shishkov almost 3 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 over 2 years ago

Duplicate of #1369

  • Status changed from Open to Cancelled

Updated by Andrey Kamaev over 2 years ago

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

Updated by Andrey Kamaev over 2 years ago

  • Category changed from highgui-images to highgui-video

Also available in: Atom PDF