aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiorgio Vazzana <mywing81@gmail.com>2013-03-08 13:03:43 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-16 02:44:36 +0100
commitbcd3eb3e7a8e597bd945031b6624f39792182dfa (patch)
treeaaccca9efa3f4ec537b0dc64a6800f1736a12d6f
parent361319d0f49475bc14c744194870f9bab78a8a83 (diff)
downloadffmpeg-bcd3eb3e7a8e597bd945031b6624f39792182dfa.tar.gz
lavd/v4l2: silence libv4l2 logging
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavdevice/v4l2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 0c1eb85014..2d7773a607 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;