mirror of
https://github.com/opencv/opencv.git
synced 2025-07-25 22:57:53 +08:00
Merge pull request #8514 from paroj:v4lretval
This commit is contained in:
commit
d15d9f558d
@ -1772,6 +1772,7 @@ static int icvSetPropertyCAM_V4L( CvCaptureCAM_V4L* capture,
|
|||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case CV_CAP_PROP_FRAME_WIDTH:
|
case CV_CAP_PROP_FRAME_WIDTH:
|
||||||
width = cvRound(value);
|
width = cvRound(value);
|
||||||
|
retval = width != 0;
|
||||||
if(width !=0 && height != 0) {
|
if(width !=0 && height != 0) {
|
||||||
capture->width = width;
|
capture->width = width;
|
||||||
capture->height = height;
|
capture->height = height;
|
||||||
@ -1781,6 +1782,7 @@ static int icvSetPropertyCAM_V4L( CvCaptureCAM_V4L* capture,
|
|||||||
break;
|
break;
|
||||||
case CV_CAP_PROP_FRAME_HEIGHT:
|
case CV_CAP_PROP_FRAME_HEIGHT:
|
||||||
height = cvRound(value);
|
height = cvRound(value);
|
||||||
|
retval = height != 0;
|
||||||
if(width !=0 && height != 0) {
|
if(width !=0 && height != 0) {
|
||||||
capture->width = width;
|
capture->width = width;
|
||||||
capture->height = height;
|
capture->height = height;
|
||||||
|
Loading…
Reference in New Issue
Block a user