blob: cd3ad431479a63bad5b47a7442688f5ae9d5c5b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
commit bcd3eb3
Author: Giorgio Vazzana <mywing81@gmail.com>
Date: Fri Mar 8 13:03:43 2013 +0100
lavd/v4l2: silence libv4l2 logging
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 0c1eb85..2d7773a 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -884,6 +884,12 @@ static int v4l2_read_header(AVFormatContext *s1)
if (!st)
return AVERROR(ENOMEM);
+#if CONFIG_LIBV4L2
+ /* silence libv4l2 logging. if fopen() fails v4l2_log_file will be NULL
+ and errors will get sent to stderr */
+ v4l2_log_file = fopen("/dev/null", "w");
+#endif
+
s->fd = device_open(s1);
if (s->fd < 0)
return s->fd;
|