Fixed MSMF video capture initialization
Applied in PR3251 to 2.4 branch.
This commit is contained in:
@@ -2459,7 +2459,7 @@ int videoDevice::findType(unsigned int size, unsigned int frameRate)
|
|||||||
fmt = vd_CaptureFormats.find(size);
|
fmt = vd_CaptureFormats.find(size);
|
||||||
if( fmt != vd_CaptureFormats.end() )
|
if( fmt != vd_CaptureFormats.end() )
|
||||||
FRM = fmt->second;
|
FRM = fmt->second;
|
||||||
else
|
else if( !vd_CaptureFormats.empty() )
|
||||||
FRM = vd_CaptureFormats.rbegin()->second;
|
FRM = vd_CaptureFormats.rbegin()->second;
|
||||||
|
|
||||||
if( FRM.empty() )
|
if( FRM.empty() )
|
||||||
|
Reference in New Issue
Block a user