check v4l frame rate capability with bitwise method.

BUG=webrtc:5462
TEST=autotest
R=perkj@webrtc.org

Review URL: https://codereview.webrtc.org/1671483002 .

Cr-Commit-Position: refs/heads/master@{#11512}
This commit is contained in:
Weiyong Yao 2016-02-05 17:06:17 -08:00
parent fd6706a310
commit e796f96378

View File

@ -245,7 +245,7 @@ int32_t VideoCaptureModuleV4L2::StartCapture(
// continue
} else {
// check the capability flag is set to V4L2_CAP_TIMEPERFRAME.
if (streamparms.parm.capture.capability == V4L2_CAP_TIMEPERFRAME) {
if (streamparms.parm.capture.capability & V4L2_CAP_TIMEPERFRAME) {
// driver supports the feature. Set required framerate.
memset(&streamparms, 0, sizeof(streamparms));
streamparms.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;