summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Tracker_PT/camera.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-25 22:40:37 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-25 22:40:37 +0200
commitaba4019cb6c33dce5ed1b2b637c8a1e8df76508b (patch)
treefd4c17d4bda57756150832bf38c85862db4dbe71 /FTNoIR_Tracker_PT/camera.cpp
parente5f2a0407077e1352d6633c5b7f6fbe3b5c5b250 (diff)
PT: don't loop forever on camera unplug
Diffstat (limited to 'FTNoIR_Tracker_PT/camera.cpp')
-rw-r--r--FTNoIR_Tracker_PT/camera.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/FTNoIR_Tracker_PT/camera.cpp b/FTNoIR_Tracker_PT/camera.cpp
index 0ef617c3..d360a819 100644
--- a/FTNoIR_Tracker_PT/camera.cpp
+++ b/FTNoIR_Tracker_PT/camera.cpp
@@ -185,7 +185,7 @@ bool CVCamera::_get_frame(Mat* frame)
* frames and then some every once in a while
* -sh
*/
- while (!cap->read(img))
+ for (int i = 0; i < 100 && !cap->read(img); i++)
;;
if (img.empty())