Fixed MSMF video capture initialization
This commit is contained in:
parent
9c91d0103f
commit
a615102947
@ -2445,11 +2445,12 @@ 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 if (FRM.empty())
|
else if(!vd_CaptureFormats.empty())
|
||||||
return -1;
|
|
||||||
else
|
|
||||||
FRM = vd_CaptureFormats.rbegin()->second;
|
FRM = vd_CaptureFormats.rbegin()->second;
|
||||||
|
|
||||||
|
if (FRM.empty())
|
||||||
|
return -1;
|
||||||
|
|
||||||
UINT64 frameRateMax = 0; SUBTYPEMap STMMax;
|
UINT64 frameRateMax = 0; SUBTYPEMap STMMax;
|
||||||
if(frameRate == 0)
|
if(frameRate == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user