From aaa16eca1fedf9450689be422ea2dc01c7d74c93 Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Thu, 29 Dec 2022 08:33:58 -0800 Subject: [PATCH] Sets the graph service packets before initializing (and validating the graph) in the objc graph wrapper. PiperOrigin-RevId: 498393761 --- mediapipe/objc/MPPGraph.mm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mediapipe/objc/MPPGraph.mm b/mediapipe/objc/MPPGraph.mm index 1bd177e80..3123eb863 100644 --- a/mediapipe/objc/MPPGraph.mm +++ b/mediapipe/objc/MPPGraph.mm @@ -230,16 +230,17 @@ if ([wrapper.delegate } - (absl::Status)performStart { - absl::Status status = _graph->Initialize(_config); - if (!status.ok()) { - return status; - } + absl::Status status; for (const auto& service_packet : _servicePackets) { status = _graph->SetServicePacket(*service_packet.first, service_packet.second); if (!status.ok()) { return status; } } + status = _graph->Initialize(_config); + if (!status.ok()) { + return status; + } status = _graph->StartRun(_inputSidePackets, _streamHeaders); if (!status.ok()) { return status;