Merge pull request #1104 from nikman-ru:cap_reuse

pull/1112/head
Andrey Pavlenko 12 years ago committed by OpenCV Buildbot
commit 75b86c9706
  1. 4
      modules/highgui/src/cap.cpp

@ -490,14 +490,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…
Cancel
Save