Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: uvideo uvm_fault panic
sc.dying%gmail.com@localhost writes:
>+uvideo: truncated CS subtype-0x7 descriptor, length 30 < 38uvideo: unimplemented VS CS descriptor len=30 type=0x24 subtype=0x07
> bLength 30
> bDescriptorType 36
> bDescriptorSubtype 7 (FRAME_MJPEG)
> bFrameIndex 1
> bmCapabilities 0x01
> Still image supported
> wWidth 1280
> wHeight 720
> dwMinBitRate 442368000
> dwMaxBitRate 442368000
> dwMaxVideoFrameBufferSize 1843200
> dwDefaultFrameInterval 333333
> bFrameIntervalType 1
> dwFrameInterval( 0) 333333
The descriptors are pretty ugly to parse and the sanity checks
added are neither correct nor sufficient.
In this case, there is a
typedef union {
uvideo_frame_interval_continuous_t continuous;
uvideo_frame_interval_discrete_t discrete;
} uvideo_frame_interval_t;
as a last element where uvideo_frame_interval_discrete_t is even
a variable length array, and all depends on the bFrameIntervalType.
The descriptor isn't padded for all possible types like a C union,
so validating against a sizeof doesn't work.
The result of course is that the formats are considered invalid
and there is no default format which the open routine assumes
to be valid without further checks...
Home |
Main Index |
Thread Index |
Old Index