Skip to content

Commit 6d0d534

Browse files
committed
Fix the crash when setting the fps of the virtual camera. (#62)
1 parent 4db11f9 commit 6d0d534

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
@@ -495,7 +495,9 @@ - (void)updateDeviceCaptureFormat:(AVCaptureDeviceFormat *)format fps:(NSInteger
495495
@"updateDeviceCaptureFormat must be called on the capture queue.");
496496
@try {
497497
_currentDevice.activeFormat = format;
498-
_currentDevice.activeVideoMinFrameDuration = CMTimeMake(1, fps);
498+
if(![NSStringFromClass([_currentDevice class]) isEqualToString:@"AVCaptureDALDevice"]) {
499+
_currentDevice.activeVideoMinFrameDuration = CMTimeMake(1, fps);
500+
}
499501
} @catch (NSException *exception) {
500502
RTCLogError(@"Failed to set active format!\n User info:%@", exception.userInfo);
501503
return;

0 commit comments

Comments
 (0)