From e796f9637800f93d9336763d42a3d664b49a1e27 Mon Sep 17 00:00:00 2001 From: Weiyong Yao Date: Fri, 5 Feb 2016 17:06:17 -0800 Subject: [PATCH] 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} --- webrtc/modules/video_capture/linux/video_capture_linux.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/modules/video_capture/linux/video_capture_linux.cc b/webrtc/modules/video_capture/linux/video_capture_linux.cc index 401a69d8c1..13149dcafc 100644 --- a/webrtc/modules/video_capture/linux/video_capture_linux.cc +++ b/webrtc/modules/video_capture/linux/video_capture_linux.cc @@ -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;