Commit ee8c4aeb authored by Alexander Reshetnikov's avatar Alexander Reshetnikov

Updated close method for ieee1394 cameras

parent 857676c6
......@@ -493,8 +493,11 @@ void CvCaptureCAM_DC1394_v2_CPP::close()
{
if (dcCam)
{
if (FD_ISSET(dc1394_capture_get_fileno(dcCam), &dc1394.camFds))
FD_CLR(dc1394_capture_get_fileno(dcCam), &dc1394.camFds);
// check for fileno valid before using
int fileno=dc1394_capture_get_fileno(dcCam);
if (fileno>=0 && FD_ISSET(fileno, &dc1394.camFds))
FD_CLR(fileno, &dc1394.camFds);
dc1394_video_set_transmission(dcCam, DC1394_OFF);
dc1394_capture_stop(dcCam);
dc1394_camera_free(dcCam);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment