gStreamer memory leak observed when restarting the pipeline multiple times
Tim Müller
tim at centricular.com
Wed Jul 29 23:36:25 UTC 2020
On Wed, 2020-07-29 at 12:21 +0000, SAMAL Suraj wrote:
Hi,
> I have a simple program which has the following pipeline:
> rtspsrc ! decodebin ! videoconvert ! videorate ! appsink
> The pipeline is started using gst_parse_launch(). For every input job
> received (new rtsp camera stream to be analyzed), the pipeline is
> recreated and restarted and we read the input frames from the
> appsink. However, everytime the pipeline is restarted, the memory
> usage of the application shoots up. I have attached the sample
> program. main2.cpp gstCapture.h gstCapture.cpp
>
> GStreamer and its plugin versions are : v1.17 OS: Ubuntu 18.04 x86_64
Have you tried running it in valgrind with --leak-check=yes (look for
*.supp suppression files in gst*/tests/check).
You can also run your code with our leak tracer, like
$ GST_TRACERS=leaks GST_DEBUG=GST_TRACER:7 ./yourapp
which will on gst_deinit() output a list of leaked objects/mini-objects
That might give you a hint as to what is leaked, if it's GStreamer
objects
Cheers
Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list