mirror of
https://github.com/opencv/opencv.git
synced 2024-12-01 23:30:06 +08:00
cap-v4l: remove unwanted loop in V4L2 mainloop
The while loop would run only once making it useless and leading to confusion. So, remove the unwanted while loop and just keep an infinite for loop.
This commit is contained in:
parent
10c570b558
commit
a527e8cc73
@ -857,11 +857,6 @@ static int read_frame_v4l2(CvCaptureCAM_V4L* capture) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int mainloop_v4l2(CvCaptureCAM_V4L* capture) {
|
static int mainloop_v4l2(CvCaptureCAM_V4L* capture) {
|
||||||
unsigned int count;
|
|
||||||
|
|
||||||
count = 1;
|
|
||||||
|
|
||||||
while (count-- > 0) {
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
@ -896,7 +891,6 @@ static int mainloop_v4l2(CvCaptureCAM_V4L* capture) {
|
|||||||
if(returnCode == 1)
|
if(returnCode == 1)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user