Skip to content

Commit a70eb2d

Browse files
authored
Fix the crash when setting the fps of the virtual camera. (#62)
1 parent 93487cf commit a70eb2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdk/objc/components/capturer/RTCCameraVideoCapturer.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,9 @@ - (void)updateDeviceCaptureFormat:(AVCaptureDeviceFormat *)format fps:(NSInteger
488488
@"updateDeviceCaptureFormat must be called on the capture queue.");
489489
@try {
490490
_currentDevice.activeFormat = format;
491-
_currentDevice.activeVideoMinFrameDuration = CMTimeMake(1, fps);
491+
if(![NSStringFromClass([_currentDevice class]) isEqualToString:@"AVCaptureDALDevice"]) {
492+
_currentDevice.activeVideoMinFrameDuration = CMTimeMake(1, fps);
493+
}
492494
} @catch (NSException *exception) {
493495
RTCLogError(@"Failed to set active format!\n User info:%@", exception.userInfo);
494496
return;

0 commit comments

Comments
 (0)