Created
June 6, 2015 11:34
-
-
Save sash-kan/c368d6115f9977cacc7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/modules/videoio/src/cap_v4l.cpp b/modules/videoio/src/cap_v4l.cpp | |
index 791f0a2..a879de7 100644 | |
--- a/modules/videoio/src/cap_v4l.cpp | |
+++ b/modules/videoio/src/cap_v4l.cpp | |
@@ -2824,21 +2824,8 @@ static void icvCloseCAM_V4L( CvCaptureCAM_V4L* capture ){ | |
{ | |
#ifdef HAVE_CAMV4L2 | |
- if (V4L2_SUPPORT == 0) | |
+ if (V4L2_SUPPORT == 1) | |
#endif /* HAVE_CAMV4L2 */ | |
-#ifdef HAVE_CAMV4L | |
- { | |
- | |
- if (capture->mmaps) | |
- free(capture->mmaps); | |
- if (capture->memoryMap) | |
- munmap(capture->memoryMap, capture->memoryBuffer.size); | |
- | |
- } | |
-#endif /* HAVE_CAMV4L */ | |
-#if defined(HAVE_CAMV4L) && defined(HAVE_CAMV4L2) | |
- else | |
-#endif /* HAVE_CAMV4L && HAVE_CAMV4L2 */ | |
#ifdef HAVE_CAMV4L2 | |
{ | |
capture->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | |
@@ -2860,6 +2847,19 @@ static void icvCloseCAM_V4L( CvCaptureCAM_V4L* capture ){ | |
} | |
} | |
#endif /* HAVE_CAMV4L2 */ | |
+#if defined(HAVE_CAMV4L) && defined(HAVE_CAMV4L2) | |
+ else | |
+#endif /* HAVE_CAMV4L && HAVE_CAMV4L2 */ | |
+#ifdef HAVE_CAMV4L | |
+ { | |
+ | |
+ if (capture->mmaps) | |
+ free(capture->mmaps); | |
+ if (capture->memoryMap) | |
+ munmap(capture->memoryMap, capture->memoryBuffer.size); | |
+ | |
+ } | |
+#endif /* HAVE_CAMV4L */ | |
if (capture->deviceHandle != -1) | |
close(capture->deviceHandle); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment