mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Merge pull request #1109 from nikman-ru:cap_reuse_24x
This commit is contained in:
commit
09ec483d02
@ -489,14 +489,14 @@ VideoCapture::~VideoCapture()
|
||||
|
||||
bool VideoCapture::open(const string& filename)
|
||||
{
|
||||
if (!isOpened())
|
||||
if (isOpened()) release();
|
||||
cap = cvCreateFileCapture(filename.c_str());
|
||||
return isOpened();
|
||||
}
|
||||
|
||||
bool VideoCapture::open(int device)
|
||||
{
|
||||
if (!isOpened())
|
||||
if (isOpened()) release();
|
||||
cap = cvCreateCameraCapture(device);
|
||||
return isOpened();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user