Skip to content

Commit

Permalink
Merge pull request opencv#1104 from nikman-ru:cap_reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Pavlenko authored and OpenCV Buildbot committed Jul 11, 2013
2 parents decd0c7 + 2121130 commit 75b86c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/highgui/src/cap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 75b86c9

Please sign in to comment.