[FFmpeg-cvslog] lavd/v4l2: silence libv4l2 logging
Giorgio Vazzana
git at videolan.org
Sat Mar 16 02:54:33 CET 2013
ffmpeg | branch: master | Giorgio Vazzana <mywing81 at gmail.com> | Fri Mar 8 13:03:43 2013 +0100| [bcd3eb3e7a8e597bd945031b6624f39792182dfa] | committer: Michael Niedermayer
lavd/v4l2: silence libv4l2 logging
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bcd3eb3e7a8e597bd945031b6624f39792182dfa
---
libavdevice/v4l2.c | 6 ++++++
1 file changed, 6 insertions(+)
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;
More information about the ffmpeg-cvslog
mailing list