make CV_CAP_PROP_FORMAT consider the current channel count

pull/5572/head
Pavel Rojtberg 9 years ago
parent 05f52b697f
commit 955f489621
  1. 2
      modules/videoio/src/cap_v4l.cpp

@ -1583,7 +1583,7 @@ static double icvGetPropertyCAM_V4L (const CvCaptureCAM_V4L* capture,
case CV_CAP_PROP_MODE: case CV_CAP_PROP_MODE:
return capture->palette; return capture->palette;
case CV_CAP_PROP_FORMAT: case CV_CAP_PROP_FORMAT:
return CV_8UC3; return CV_MAKETYPE(CV_8U, capture->frame.nChannels);
case CV_CAP_PROP_CONVERT_RGB: case CV_CAP_PROP_CONVERT_RGB:
return capture->convert_rgb; return capture->convert_rgb;
} }

Loading…
Cancel
Save