mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
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 <smichaud@pobox.com>
This commit is contained in:
co-authored by
Steven Michaud
parent
c9b82da5a5
commit
36a86f5217
@@ -114,6 +114,7 @@
|
||||
|
||||
IOSurfaceRef surface = IOSurfaceLookupFromMachPort(
|
||||
[framePort machPort]);
|
||||
[framePort invalidate];
|
||||
mach_port_deallocate(mach_task_self(),
|
||||
[framePort machPort]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user