omx cam: do not select sensor for stereo mode
[glsdk/omapdrmtest.git] / omx_cam / VisionCamSimpleTest.cpp
index db556d63a7852e373726724deca452c955d4633f..bf3fea6d46233469e5239f921f1038b979302c48 100644 (file)
@@ -296,7 +296,10 @@ int main(int argc, char *argv[]) {
     // Can't set ROTATION here, see below
     VCAM_COMPLAIN_IF_FAILED(greError, pCam->setParameter(VCAM_PARAM_FPS_FIXED, &fps, sizeof(fps)));
     VCAM_COMPLAIN_IF_FAILED(greError, pCam->setParameter(VCAM_PARAM_CAP_MODE, &capmode, sizeof(capmode)));
-    VCAM_COMPLAIN_IF_FAILED(greError, pCam->setParameter(VCAM_PARAM_SENSOR_SELECT, &sensorIndex, sizeof(sensorIndex)));
+    if ((sensorIndex >= 0) && (sensorIndex <= 1))
+    {
+        VCAM_COMPLAIN_IF_FAILED(greError, pCam->setParameter(VCAM_PARAM_SENSOR_SELECT, &sensorIndex, sizeof(sensorIndex)));
+    }
     if (capmode == VCAM_STEREO_MODE)
     {
         VCAM_COMPLAIN_IF_FAILED(greError, pCam->setParameter(VCAM_PARAM_STEREO_INFO, &info, sizeof(info)));