1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Native camera issue on HTC One S fixed.

Camera connect->disconnect->connect leads to sigsegv.
Apply properties method reimplemented.
This commit is contained in:
Alexander Smorkalov
2012-09-07 12:43:45 +04:00
parent 19e1f89cd6
commit 710e070990
4 changed files with 49 additions and 35 deletions
+4 -2
View File
@@ -448,13 +448,15 @@ VideoCapture::~VideoCapture()
bool VideoCapture::open(const string& filename)
{
cap = cvCreateFileCapture(filename.c_str());
if (!isOpened())
cap = cvCreateFileCapture(filename.c_str());
return isOpened();
}
bool VideoCapture::open(int device)
{
cap = cvCreateCameraCapture(device);
if (!isOpened())
cap = cvCreateCameraCapture(device);
return isOpened();
}