Ticket #1560 (closed defect: fixed)
v4l2 device won't open after opening/closing it 16 times
|Reported by:||tmatth||Owned by:|
|Blocking:||Reproduced by developer:||yes|
|Analyzed by developer:||no|
Description (last modified by Cigaes) (diff)
Summary of the bug:
In the attached case, I open and close a v4l2 device (/dev/video0) 17 times. On the 17th time, it fails to open with the following errors:
libv4l2: error attempting to open more then 16 video devices [video4linux2,v4l2 @ 0x1f6a5c0] ioctl(VIDIOC_QUERYCAP): Bad file descriptor Could not open input "/dev/video0"
How to reproduce:
Build and run the attached test case with a v4l2 device connected.
I'm using the ffmpeg git master branch:
ffmpeg version N-42636-ga8d8e86 Copyright (c) 2000-2012 the FFmpeg developers built on Jul 19 2012 17:32:59 with gcc 4.7.0 (GCC) 20120507 (Red Hat 4.7.0-5) configuration: --prefix=/opt/ --enable-bzlib --enable-gnutls --enable-libv4l2 --enable-libx264 --enable-x11grab --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --enable-pic