فهرست منبع

mac-virtualcam: Fix random crashes in applications loading VirtualCam

Without invalidating the mach port used for sharing the IOSurface
between OBS and the application displaying the virtual camera output,
IOKit seems to run into the issue of receiving "shared" mach ports,
possibly because of port exhaustion. IOKit requires a "new" port
however and crashes upon that error otherwise.

Co-authored-by: Steven Michaud <[email protected]>
PatTheMav 3 سال پیش
والد
کامیت
6bf6e27ec1
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      plugins/mac-virtualcam/src/dal-plugin/OBSDALMachClient.mm

+ 1 - 0
plugins/mac-virtualcam/src/dal-plugin/OBSDALMachClient.mm

@@ -114,6 +114,7 @@
 
 			IOSurfaceRef surface = IOSurfaceLookupFromMachPort(
 				[framePort machPort]);
+			[framePort invalidate];
 			mach_port_deallocate(mach_task_self(),
 					     [framePort machPort]);