Commit ad52dd37 authored by Roman Donchenko's avatar Roman Donchenko

Revert "Merge pull request #1376 from StevenPuttemans:bugfix_3186"

This reverts commit 41b8479d, reversing
changes made to 531471b0.

Reason: breaks the build.
parent ac9bc642
...@@ -1236,10 +1236,10 @@ static int read_frame_v4l2(CvCaptureCAM_V4L* capture) { ...@@ -1236,10 +1236,10 @@ static int read_frame_v4l2(CvCaptureCAM_V4L* capture) {
//set timestamp in capture struct to be timestamp of most recent frame //set timestamp in capture struct to be timestamp of most recent frame
capture->timestamp = buf.timestamp; capture->timestamp = buf.timestamp;
return 2; return 1;
} }
static int mainloop_v4l2(CvCaptureCAM_V4L* capture) { static void mainloop_v4l2(CvCaptureCAM_V4L* capture) {
unsigned int count; unsigned int count;
count = 1; count = 1;
...@@ -1273,13 +1273,8 @@ static int mainloop_v4l2(CvCaptureCAM_V4L* capture) { ...@@ -1273,13 +1273,8 @@ static int mainloop_v4l2(CvCaptureCAM_V4L* capture) {
break; break;
} }
int readresult = read_frame_v412(capture); if (read_frame_v4l2 (capture))
if (readresult == 2){ break;
return 0;
}
if (readresult){
return 1;
}
} }
} }
} }
...@@ -1359,10 +1354,7 @@ static int icvGrabFrameCAM_V4L(CvCaptureCAM_V4L* capture) { ...@@ -1359,10 +1354,7 @@ static int icvGrabFrameCAM_V4L(CvCaptureCAM_V4L* capture) {
{ {
// skip first frame. it is often bad -- this is unnotied in traditional apps, // skip first frame. it is often bad -- this is unnotied in traditional apps,
// but could be fatal if bad jpeg is enabled // but could be fatal if bad jpeg is enabled
if(!mainloop_v4l2(capture)){ mainloop_v4l2(capture);
fprintf( stderr, "HIGHGUI ERROR: V4L: Could not capture image.\n");
return 0;
}
} }
#endif #endif
...@@ -1374,10 +1366,9 @@ static int icvGrabFrameCAM_V4L(CvCaptureCAM_V4L* capture) { ...@@ -1374,10 +1366,9 @@ static int icvGrabFrameCAM_V4L(CvCaptureCAM_V4L* capture) {
if (V4L2_SUPPORT == 1) if (V4L2_SUPPORT == 1)
{ {
if(!mainloop_v4l2(capture)){
fprintf( stderr, "HIGHGUI ERROR: V4L: Could not capture image.\n"); mainloop_v4l2(capture);
return 0;
}
} }
#endif /* HAVE_CAMV4L2 */ #endif /* HAVE_CAMV4L2 */
#if defined(HAVE_CAMV4L) && defined(HAVE_CAMV4L2) #if defined(HAVE_CAMV4L) && defined(HAVE_CAMV4L2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment