Merge pull request #2997 from mojoritty:bugfix_3767

pull/3004/merge
Vadim Pisarevsky 11 years ago
commit 38b3698b97
  1. 4
      modules/highgui/src/cap_dshow.cpp

@ -1825,6 +1825,8 @@ bool videoInput::setVideoSettingCamera(int deviceID, long Property, long lValue,
hr = VDList[deviceID]->pVideoInputFilter->QueryInterface(IID_IAMCameraControl, (void**)&pIAMCameraControl);
if (FAILED(hr)) {
printf("Error\n");
if(VDList[deviceID]->pVideoInputFilter)VDList[deviceID]->pVideoInputFilter->Release();
if(VDList[deviceID]->pVideoInputFilter)VDList[deviceID]->pVideoInputFilter = NULL;
return false;
}
else
@ -1843,6 +1845,8 @@ bool videoInput::setVideoSettingCamera(int deviceID, long Property, long lValue,
pIAMCameraControl->Set(Property, lValue, Flags);
}
pIAMCameraControl->Release();
if(VDList[deviceID]->pVideoInputFilter)VDList[deviceID]->pVideoInputFilter->Release();
if(VDList[deviceID]->pVideoInputFilter)VDList[deviceID]->pVideoInputFilter = NULL;
return true;
}
}

Loading…
Cancel
Save