mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 19:50:38 +08:00
Fixed getting CV_CAP_PROP_FOURCC property value
Save selected FCC in order to return proper CV_CAP_PROP_FOURCC property value (currently FCC for RGB24 is always returned).
This commit is contained in:
parent
4b1bb702ce
commit
5c96021172
@ -2578,6 +2578,7 @@ int videoInput::start(int deviceID, videoDevice *VD){
|
||||
|
||||
if( setSizeAndSubtype(VD, VD->tryWidth, VD->tryHeight, VD->tryVideoType) ){
|
||||
VD->setSize(VD->tryWidth, VD->tryHeight);
|
||||
VD->videoType = VD->tryVideoType;
|
||||
foundSize = true;
|
||||
} else {
|
||||
// try specified size with all formats
|
||||
@ -2588,6 +2589,7 @@ int videoInput::start(int deviceID, videoDevice *VD){
|
||||
if(verbose)printf("SETUP: trying format %s @ %i by %i\n", guidStr, VD->tryWidth, VD->tryHeight);
|
||||
if( setSizeAndSubtype(VD, VD->tryWidth, VD->tryHeight, mediaSubtypes[i]) ){
|
||||
VD->setSize(VD->tryWidth, VD->tryHeight);
|
||||
VD->videoType = mediaSubtypes[i];
|
||||
foundSize = true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user