cap_v4l: SetProperty - do not return false while setting video size

This commit is contained in:
Pavel Rojtberg 2017-04-04 15:07:02 +02:00
parent f34b2f7b8d
commit d92d82d194

View File

@ -1772,6 +1772,7 @@ static int icvSetPropertyCAM_V4L( CvCaptureCAM_V4L* capture,
switch (property_id) {
case CV_CAP_PROP_FRAME_WIDTH:
width = cvRound(value);
retval = width != 0;
if(width !=0 && height != 0) {
capture->width = width;
capture->height = height;
@ -1781,6 +1782,7 @@ static int icvSetPropertyCAM_V4L( CvCaptureCAM_V4L* capture,
break;
case CV_CAP_PROP_FRAME_HEIGHT:
height = cvRound(value);
retval = height != 0;
if(width !=0 && height != 0) {
capture->width = width;
capture->height = height;