|
@@ -15,6 +15,7 @@
|
|
|
@property NSPort *port;
|
|
|
@property NSMutableSet *clientPorts;
|
|
|
@property NSRunLoop *runLoop;
|
|
|
+@property uint32_t seed;
|
|
|
@end
|
|
|
|
|
|
@implementation OBSDALMachServer
|
|
@@ -155,6 +156,7 @@
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ IOSurfaceLock(surface, 0, &_seed);
|
|
|
mach_port_t framePort = IOSurfaceCreateMachPort(surface);
|
|
|
|
|
|
if (!framePort) {
|
|
@@ -174,6 +176,7 @@
|
|
|
]];
|
|
|
|
|
|
mach_port_deallocate(mach_task_self(), framePort);
|
|
|
+ IOSurfaceUnlock(surface, 0, &_seed);
|
|
|
}
|
|
|
}
|
|
|
|