Probably a bug in statically linked OpenCV


During my testing of my application, it looks like reading images from camera, then relasing it and then doing it again just don’t work.
It doesn’t matter, whether I do it with SDK detector:

CameraDetector detector();
detector.start() -> here fails with error like bad descriptor

or with opencv classes:

VIdeoCapture capture();;
while ( m))…
while ( m))… -> here fails with similar errors like above

VIDIOC_STREAMON: Bad file descriptor
but I think it happened, that I got invalid pixel format in second pass.

When I keep camera open through the whole live of the application, everything works. But this is pointless, because most of the time camera is not used.

Can you please check? Maybe upgrade OpenCV to a newer version.


I ran into some other problems with OpenCV as well. Look like they are running a very old version of OpenCV. Something from at least 2 years ago.


@archy_wilhes Apologize for the delayed response. Yes we are statically linking to OpenCV v2.4.8. We have some custom changes that we are in process of merging and get back onto OpenCV v3.3.

Build error with OpenCV's libpng when using Affdex for Unity with another third-party video-streaming library in Swift