File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -911,7 +911,7 @@ static int mainloop_v4l2(CvCaptureCAM_V4L* capture) {
911
911
if (returnCode == -1 )
912
912
return -1 ;
913
913
if (returnCode == 1 )
914
- break ;
914
+ return 1 ;
915
915
}
916
916
}
917
917
return 0 ;
@@ -956,15 +956,15 @@ static bool icvGrabFrameCAM_V4L(CvCaptureCAM_V4L* capture) {
956
956
#if defined(V4L_ABORT_BADJPEG)
957
957
// skip first frame. it is often bad -- this is unnotied in traditional apps,
958
958
// but could be fatal if bad jpeg is enabled
959
- if (mainloop_v4l2 (capture) == - 1 )
959
+ if (mainloop_v4l2 (capture) != 1 )
960
960
return false ;
961
961
#endif
962
962
963
963
/* preparation is ok */
964
964
capture->FirstCapture = 0 ;
965
965
}
966
966
967
- if (mainloop_v4l2 (capture) == - 1 ) return false ;
967
+ if (mainloop_v4l2 (capture) != 1 ) return false ;
968
968
969
969
return true ;
970
970
}
You can’t perform that action at this time.
0 commit comments