MediaPipeUnityPlugin
MediaPipeUnityPlugin copied to clipboard
Fix poseLandmarks stream generating an empty packet randomly
Since the poseWorldLandmarks stream does not have this issue, it becomes quite trivial to detect when this empty packet has been generated. Moreover, Mediapipe does not output poseWorldLandmarks without outputting poseLandmarks so it is likely not a mediapipe issue. Until the root cause can be investigated, this patch will fix and synchronize the poseLandmarks stream with the rest of the output.
If this issue is not observed on some platforms, then this patch wont affect that - there is never a scenario in which the poseLandmarks stream has an empty packet but the poseWorldLandmarks stream has a value, unless it is the erroneous case that this patch resolves.
The issue has only been observed in the synchronous modes and not in Async.
I also noticed this problem
related to #642