Hello everyone!
We are seeing some issues with memory leaks when using the bufapi-version=true option in nvvideoconvert/nvv4l2h264enc. We’re testing with L4T 32.3.1.
There are some similar threads here and here, but they don’t provide any solutions.
Overview of the tests that we ran:
// INPUT OUTPUT BUFAPI-VERSION RESULT
nvarguscamerasrc -> nvvideoconvert -> h264 / h265 true LEAK
nvarguscamerasrc -> nvvideoconvert -> h264 / h265 false GOOD
nvarguscamerasrc -> identity -> h264 / h265 true LEAK
nvarguscamerasrc -> identity -> h264 / h265 false GOOD
nvarguscamerasrc -> nvvidconv -> omxenc n/a GOOD
videotestsrc x-raw -> nvvideoconvert -> identity -> h264 true LEAK
videotestsrc x-raw -> nvvideoconvert -> identity -> h264 false LEAK
videotestsrc x-raw -> nvvidconv -> identity -> h264 true SEGV (expected, but we would prefer an error)
videotestsrc x-raw -> nvvidconv -> identity -> h264 false GOOD
We have attached some code for you to compile so you can reproduce the issue yourself. You can compile it with:
g++ -o memleak memleak.cpp
pkg-config --cflags --libs gstreamer-1.0
-lgstapp-1.0
Please check the memory usage with htop while it is running so you can see it increase after every run.
Hope you can provide us with a solution for this. Thanks in advance!
memleak.cpp (7.2 KB)