diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-25 22:40:37 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-25 22:40:37 +0200 |
commit | aba4019cb6c33dce5ed1b2b637c8a1e8df76508b (patch) | |
tree | fd4c17d4bda57756150832bf38c85862db4dbe71 /FTNoIR_Tracker_PT/camera.cpp | |
parent | e5f2a0407077e1352d6633c5b7f6fbe3b5c5b250 (diff) |
PT: don't loop forever on camera unplug
Diffstat (limited to 'FTNoIR_Tracker_PT/camera.cpp')
-rw-r--r-- | FTNoIR_Tracker_PT/camera.cpp | 2 |
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())
|