small change

This commit is contained in:
lostjared
2018-05-09 04:39:03 -07:00
parent a546cdd42b
commit 8f48359628

View File

@@ -44,20 +44,10 @@ bool Playback::setVideoCamera(int device, int res, cv::VideoWriter wr, bool reco
mode = MODE_CAMERA;
device_num = device;
mutex.lock();
if(capture.isOpened()) {
#if defined(__linux__) || defined(_WIN32)
capture.open(device);
if(!capture.isOpened()) {
mutex.unlock();
return false;
}
#endif
} else {
capture.open(device);
if(!capture.isOpened()) {
mutex.unlock();
return false;
}
capture.open(device);
if(!capture.isOpened()) {
mutex.unlock();
return false;
}
recording = record;
writer = wr;