mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
revert patch from PR 1074, since it break capturing on MacOSX
This commit is contained in:
parent
886c009da6
commit
be040ff513
@ -277,8 +277,11 @@ bool CvCaptureCAM::grabFrame(double timeOut) {
|
||||
double sleepTime = 0.005;
|
||||
double total = 0;
|
||||
|
||||
while (![capture updateImage] && (total += sleepTime)<=timeOut)
|
||||
usleep((int)(sleepTime*1000));
|
||||
NSDate *loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime];
|
||||
while (![capture updateImage] && (total += sleepTime)<=timeOut &&
|
||||
[[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode
|
||||
beforeDate:loopUntil])
|
||||
loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime];
|
||||
|
||||
[localpool drain];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user