webrtc crashes with virtual cameras on Windows.
In the market, there are several Virtual Camera apps which could allow multi-apps share one camera at same time. We have several reports that at least two of them would cause Webrtc crash because of 0 maxFPS read from their drivers. Finally I can reproduce and verify with one of them, 'Asus Virtual Camera' as in feedback. So I submit the fix as we discussed before. BUG = Issue 464 & 675 TEST = ViE_Win_Test with virtual camera app installed Review URL: https://webrtc-codereview.appspot.com/698005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2526 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
f5a91fdfab
commit
ad69ca73d4
@ -75,7 +75,9 @@ CaptureInputPin::GetMediaType (IN int iPosition, OUT CMediaType * pmt)
|
||||
pvi->bmiHeader.biPlanes = 1;
|
||||
pvi->bmiHeader.biClrImportant = 0;
|
||||
pvi->bmiHeader.biClrUsed = 0;
|
||||
if (_requestedCapability.maxFPS != 0) {
|
||||
pvi->AvgTimePerFrame = 10000000/_requestedCapability.maxFPS;
|
||||
}
|
||||
|
||||
SetRectEmpty(&(pvi->rcSource)); // we want the whole image area rendered.
|
||||
SetRectEmpty(&(pvi->rcTarget)); // no particular destination rectangle
|
||||
|
@ -229,6 +229,9 @@ WebRtc_Word32 VideoCaptureDS::SetCameraOutput(
|
||||
if (capability.maxFPS > requestedCapability.maxFPS)
|
||||
{
|
||||
capability.maxFPS = requestedCapability.maxFPS;
|
||||
} else if (capability.maxFPS <= 0)
|
||||
{
|
||||
capability.maxFPS = 30;
|
||||
}
|
||||
// Store the new expected capture delay
|
||||
_captureDelay = capability.expectedCaptureDelay;
|
||||
|
Loading…
x
Reference in New Issue
Block a user