Memory leak when gstreamer pull rtsp stream

I had push one rtsp network stream for this code in the attachment, but I still get memory leak. The memory fast increased 200M in 2mins.

My jetson version information also is "# R32 (release), REVISION: 7.2, GCID: 30192233, BOARD: t186ref, EABI: aarch64, DATE: Sun Apr 17 09:53:50 UTC 2022
".

Could you check again if you had memory leak when run the code in your machine? Please make sure there is one reliable rtsp stream for your test.

gsttest-20230217.tar.gz (2.2 KB)

Hi,
Please apply the two fixes and try again:
Memory Leak (Alloc/free mismatch) in Tegra multimedia API (encoder) - #6 by DaneLLL
Syncpts and threads leak using gstreamer plugin nvv4l2decoder - #11 by DaneLLL

I had tried the two fixes, but it didn’t work. Memory leak had not been still solved.

Could you run my test in above attachment in Xavier NX?