diff options
author | Laurent Pinchart <laurent.pinchart@skynet.be> | 2009-06-09 18:07:44 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@skynet.be> | 2009-06-09 18:07:44 +0200 |
commit | 3d4939aa3fd67ca96970740ca759d960c8511437 (patch) | |
tree | 4f29b7aee53972938b90689a701c5d6fa9a83d71 /linux/drivers/media/video | |
parent | fefb311aefd18f36e9a772703a11999fb468eaff (diff) | |
download | mediapointer-dvb-s2-3d4939aa3fd67ca96970740ca759d960c8511437.tar.gz mediapointer-dvb-s2-3d4939aa3fd67ca96970740ca759d960c8511437.tar.bz2 |
uvcvideo: Ignore non-UVC trailing interface descriptors.
From: Laurent Pinchart <laurent.pinchart@skynet.be>
Herton Ronaldo Krzesinski from Mandriva reported that one Bison Electronics
webcam exposes a non-UVC interface descriptor. Instead of failing completely,
ignore trailing non-UVC descriptors and move on.
Thanks to Herton for reporting the problem and submitting a patch proposal.
Priority: normal
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/uvc/uvc_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/uvc/uvc_driver.c b/linux/drivers/media/video/uvc/uvc_driver.c index c62bc8114..40df6828f 100644 --- a/linux/drivers/media/video/uvc/uvc_driver.c +++ b/linux/drivers/media/video/uvc/uvc_driver.c @@ -644,7 +644,7 @@ static int uvc_parse_streaming(struct uvc_device *dev, _buflen = buflen; /* Count the format and frame descriptors. */ - while (_buflen > 2) { + while (_buflen > 2 && _buffer[1] == CS_INTERFACE) { switch (_buffer[2]) { case VS_FORMAT_UNCOMPRESSED: case VS_FORMAT_MJPEG: @@ -709,7 +709,7 @@ static int uvc_parse_streaming(struct uvc_device *dev, streaming->nformats = nformats; /* Parse the format descriptors. */ - while (buflen > 2) { + while (buflen > 2 && buffer[1] == CS_INTERFACE) { switch (buffer[2]) { case VS_FORMAT_UNCOMPRESSED: case VS_FORMAT_MJPEG: |