make CV_CAP_PROP_FORMAT consider the current channel count

This commit is contained in:
Pavel Rojtberg 2015-11-01 11:41:26 +01:00
parent 05f52b697f
commit 955f489621

View File

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