How to free/restart the gstreamer nvarguscamerasrc module

Hi,
i’m using a waveshare camera with python and opencv. Everything works fine with my setup. Sometimes i got an error with my gstreamer pipeline like “no return from capture device”. I think this happens when i quit on my application dirty before (like ctrl+c)

Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:532 Failed to create CaptureSession
Got EOS from element "pipeline0".

The only thing i can do, to fix this problem, is to reboot the whole nano. After the reboot everything works as expected

So the question ist, how to reset/restart gstreamer or kill the “old” pipeline.

best regards
Martin

This looks like a solution: ('appsink max-buffers=1 drop=True ')

def gstreamer_auto(self):
    return ('nvarguscamerasrc ! '
    'video/x-raw(memory:NVMM), format=NV12, '
    'width=3280, height=2464, '
    'framerate=10/1 ! '
    'nvvidconv flip-method=2 ! '
    'video/x-raw, format=I420 ! '
    'appsink max-buffers=1 drop=True ')

https://devtalk.nvidia.com/default/topic/1051913/jetson-nano/how-to-close-gstreamer-pipeline-in-python/2