Fixed formatting in MPPImageSegmenter.mm
This commit is contained in:
parent
d9d4016334
commit
f1a5c8d549
|
@ -243,14 +243,15 @@ using ::mediapipe::tasks::core::PacketsCallback;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output packet map is moved to a block variable that will not be deallocated for the lifetime of the `dispatch_async` call. Eventhough masks are not copied, we have to ensure that they are not de allocated before the delegate call completes.
|
// Output packet map is moved to a block variable that will not be deallocated for the lifetime of
|
||||||
|
// the `dispatch_async` call. Since masks are not copied, this ensures that they are only
|
||||||
|
// deallocated after the delegate call completes.
|
||||||
__block PacketMap outputPacketMap = std::move(liveStreamResult.value());
|
__block PacketMap outputPacketMap = std::move(liveStreamResult.value());
|
||||||
if (outputPacketMap[kImageOutStreamName.cppString].IsEmpty()) {
|
if (outputPacketMap[kImageOutStreamName.cppString].IsEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch_async(_callbackQueue, ^{
|
dispatch_async(_callbackQueue, ^{
|
||||||
|
|
||||||
MPPImageSegmenterResult *result =
|
MPPImageSegmenterResult *result =
|
||||||
[MPPImageSegmenter imageSegmenterResultWithOutputPacketMap:outputPacketMap
|
[MPPImageSegmenter imageSegmenterResultWithOutputPacketMap:outputPacketMap
|
||||||
shouldCopyMaskPacketData:NO];
|
shouldCopyMaskPacketData:NO];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user