The OpenCV VideoCapture hangs when the rtspsrc unreachable after many retries

Hi,
It should be required to terminate the current pipeline and re-initialize a new one when network is unstable and the source cannot generate RTSP stream. Please refer to this sample and try to terminate and re-launch cv2.VideoCapture():
Nvidia-desktop kernel: [407343.357549] (NULL device *): nvhost_channelctl: invalid cmd 0x80685600 - #5 by DawnMaples