Performing OpenCV operations on pipeline buffer

Even if the frame is overwritten multiple times, may I know the reason why this kind of flickering is observed. It’s understandable if the bbox themselves don’t get drawn. But sometimes, only two sides are drawn, sometimes 3 sometimes all 4. And the remaining sides have whitish colour.