summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-06-20 08:25:08 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-06-20 08:25:08 +0200
commit13d308f8a7bdfcdd8bac2db3f2c6a9a7bc5e9db0 (patch)
tree2cf5af73df80767313dc1edee81109b61112bf2b
parentb90d1b6bf846a97b260e01f0799f39ffb439ea6d (diff)
downloadcv-13d308f8a7bdfcdd8bac2db3f2c6a9a7bc5e9db0.zip
cv-13d308f8a7bdfcdd8bac2db3f2c6a9a7bc5e9db0.tar.gz
cv-13d308f8a7bdfcdd8bac2db3f2c6a9a7bc5e9db0.tar.bz2
cvg: Add VIDIOC_QUERYMENU perror hack
-rw-r--r--cvg.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/cvg.c b/cvg.c
index 1d43aba..c2d0cd7 100644
--- a/cvg.c
+++ b/cvg.c
@@ -3,6 +3,7 @@
#include <glib.h>
#include <cv.h>
#include <highgui.h>
+#include <errno.h>
struct cvg {
GtkWidget *drawing_area1;
@@ -419,3 +420,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));
+}