Merge pull request #1109 from nikman-ru:cap_reuse_24x

pull/1115/merge
Roman Donchenko 12 years ago committed by OpenCV Buildbot
commit 09ec483d02
  1. 4
      modules/highgui/src/cap.cpp

@ -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…
Cancel
Save