Memory leak when nvv4l2decoder with drop-frame-interval param

• Hardware Platform: Jetson Xavier NX 16G
• JetPack Version: 4.6
I’m using opencv4.6 cv::videoCapture capi with gstreamer backend to capture ip camera video stream (no audio), when I add a drop-frame-interval=25 param, the process has a memory leak for about 2.5%(400M) every 6 hours.

I’ve tried rtsp and rtmp streams, the memory leak only shows when i add drop-frame-interval param for nvv4l2decoder, here are my pipelines for rtsp and rtmp:

rtspsrc location=rtsp://url?tcp latency=0 ! rtph264depay ! h264parse ! nvv4l2decoder drop-frame-interval=25 enable-max-performance=0 ! nvvidconv ! video/x-raw, format=BGRx ! videoconvert ! appsink sync=false

rtmpsrc location="rtmp://localhost/webcam/219 live=1" ! flvdemux ! h264parse ! nvv4l2decoder skip-frames=2 enable-max-performance=0 ! nvvidconv ! video/x-raw, format=BGRx ! videoconvert ! appsink sync=false

I’ve tried gst-launch-1.0 cmd with GST_TRACERS=“leaks”, the output shows memory leak too, but I can’t really get more informations from the it. Also the gst-launch-1.0 process didn’t really show a significant leak like my c++ program, there were only 0.1% memory increase after 3 hours test.

In other case I use nvv4l2decoder skip-frames=2 or drop frames in my c++ code, so I think my code should be fine. I’ve checked the opencv gst backend implement, but can’t really get much information.
Any similar problems or how can I debug with this? (like getting useful imformation with GST_TRACERS=“leaks”)

Which Deepstream version did you use? We have fixed many memory leak problem in the latest version, 6.1.1. You can try to upgrade it.

You can refer the link below:

Hmmm… I’m not using Deepstream SDK at all, just gstreamer in opencv.
Deepstream surely looks functional, but it should take time to modify my current work.

If there aren’t more experence about my current problem, I may try Deepstream SDK later. Do I have to upgrade my jetpack to 5.0.2 to use the latest DS?That could be a problem too since there will be environment change and i have more than one to upgrade.

Well, i still hope to solve my current problem.

Cause the nvv4l2decoder plugin provided by Deepstream, you need to update Deepstream to update the latest nvv4l2decoder plugin. So we sugguet you to update the Deepstream version to update the nvv4l2decoder plugin to fix some memory leak problem.

Oh I see, I didn’t really know that. I’ll try to update and probably reply the result next week.