While saving images from rtsp streams , frames and detected objects are not clear

Hey

I am facing issues with captured objects and frame . I am getting a green glitch in an image. Not sure why

link to image : https://ibb.co/Z1H9KMc

There are multiple image with green glitch on top.

Hi,
We have reference codes of saving to JPEGs in FAQ
2. Sample of customizing gst-dsexample
5. Sample of accessing NvBufSurface

Please take a look.