* Aravis: fixing releasing object when no communication with camera is possible
* Removing unnecessary include
void CvCaptureCAM_Aravis::close()
{
- if(camera)
+ if(camera) {
stopCapture();
- g_object_unref(camera);
- camera = NULL;
+ g_object_unref(camera);
+ camera = NULL;
+ }
}
bool CvCaptureCAM_Aravis::getDeviceNameById(int id, std::string &device)
{
arv_camera_stop_acquisition(camera);
- g_object_unref(stream);
- stream = NULL;
+ if(stream) {
+ g_object_unref(stream);
+ stream = NULL;
+ }
}
bool CvCaptureCAM_Aravis::startCapture()