summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--capture.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/capture.c b/capture.c
index 6f5ecd0..8576e20 100644
--- a/capture.c
+++ b/capture.c
@@ -7,6 +7,8 @@
#include <cv.h>
#include <highgui.h>
+#include <errno.h>
+
/* Only available as of GTK 3.4 */
#ifndef GDK_BUTTON_PRIMARY
#define GDK_BUTTON_PRIMARY 1
@@ -257,3 +259,13 @@ main(int argc, char *argv[])
return 0;
}
+
+/* FIXME: Need to overload perror so that invalid OpenCV messages are hidden. */
+void
+perror(const char *s)
+{
+ if (strcmp("VIDIOC_QUERYMENU", s) == 0)
+ return;
+
+ fprintf(stderr, "%s: %s\n", s, strerror(errno));
+}