Hi,
In gst_sample.tgz, it switches to NULL state without EoS notification. This may not be good. We suggest send EoS and wait for it, switch to NULL state, unrefer and re-initialize the pipeline.
Here is a sample of sending EoS:
GStreamer freeze when using qtmux and NVIDIA-accelerated h264/h265 encoding - #7 by DaneLLL