From 5e62e71b13f29c227727a145765f2e625b4da30b Mon Sep 17 00:00:00 2001 From: Pavel Rojtberg Date: Sun, 11 Oct 2015 16:28:01 +0200 Subject: [PATCH] fix wrong ifdef bracketing in the case of HAVE_CAMV4L2 && !HAVE_CAMV4L there was no body for the if statement. --- modules/videoio/src/cap_v4l.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/videoio/src/cap_v4l.cpp b/modules/videoio/src/cap_v4l.cpp index 4f00e43d51..297d619f86 100644 --- a/modules/videoio/src/cap_v4l.cpp +++ b/modules/videoio/src/cap_v4l.cpp @@ -1939,18 +1939,16 @@ static int sonix_decompress(int width, int height, unsigned char *inp, unsigned static IplImage* icvRetrieveFrameCAM_V4L( CvCaptureCAM_V4L* capture, int) { #ifdef HAVE_CAMV4L2 - if (V4L2_SUPPORT == 0) -#endif /* HAVE_CAMV4L2 */ #ifdef HAVE_CAMV4L + if (V4L2_SUPPORT == 0) { - /* [FD] this really belongs here */ if (ioctl(capture->deviceHandle, VIDIOCSYNC, &capture->mmaps[capture->bufferIndex].frame) == -1) { fprintf( stderr, "VIDEOIO ERROR: V4L: Could not SYNC to video stream. %s\n", strerror(errno)); } - } #endif /* HAVE_CAMV4L */ +#endif /* HAVE_CAMV4L2 */ /* Now get what has already been captured as a IplImage return */