Corrupted frames from pyds.get_nvds_buffer_surface

I am trying to extract frames with the help of probe in my deepstream pipeline but sometimes it corrupts the frames. I am using 3 60FPS camera sources to get the video stream.