• Stephan Hilb's avatar
    lavd/v4l2: produce a 0 byte packet when a dequeued buffer's size is unexpected · b761ae07
    Stephan Hilb authored
    Behave like we do for V4L2_BUF_FLAG_ERROR, implemented in commit 28f20d2f .
    
    For some devices (probably also related to the V4L driver implementation)
    it happens that when invoking the ioctl DQBUF, the returned buffer is not
    of the expected size. Here are two examples for such occurrences:
    
        [video4linux2,v4l2 @ 0x258b440] Dequeued v4l2 buffer contains 609596 bytes, but 614400 were expected. Flags: 0x00000001.
        /dev/video1: Invalid data found when processing input
    
        [video4linux2,v4l2 @ 0x225f440] Dequeued v4l2 buffer contains 609508 bytes, but 614400 were expected. Flags: 0x00000001.
        /dev/video1: Invalid data found when processing input
    
    For the ffmpeg CLI tool this means it will stop capturing and exit.
    
    The described behaviour was observed at least with one OmniVision USB
    web cam and with some stk1160 devices.
    
    If you search the web for the error message, you will find quite a few
    instances of this problem. Some of them experienced on other devices.
    
    Probably fixes ticket #4795
    Signed-off-by: 's avatarAlexander Strasser <eclipse7@gmx.net>
    b761ae07
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...