Memory leak when use decodebin after parsebin

I want to store non decode video frame for restream it without paying cost of encoding. for this purpose I use urisourcebin → parsebin → decodebin pipeline.
but when use decodebin after parsebin I get memory leak.
Memory Leak Pipeline
None Memory Leak Pipeline
*you cane see pipeline with this tools: Graphviz Online

I use visual studio memory profiler and bellow image is memory dump difference after some minutes

Have I done something wrong?
I want to move tee element after parsebin in “none memory leak” pipeline and do h264depay once. (urisourcebin → parsebin → tee → tee. appsrc - tee. decodebin)
Thanks

It should be fine to use decodebin(3) after parsebin.

Can’t really see your pipeline graphs though, putting dot files into google docs isn’t really the best way to present those to us - perhaps you could just turn them into an SVG or PNG and attach that?

It’s correct. Using decodebin3 after parsebin doesn’t result in any memory leaks. my gstreamer version is 1.22.5. You can see png file related to the memory leak pipeline below. I need to specify whether the decoding should be done on CPU or GPU, and for that, I need to set the ‘force-sw-decoders’ property for decodebin. However, this property is not available in decodebin3. Is there a way to determine which hardware decodebin3 should use for decoding?

Perhaps you could try a newer version of GStreamer - either the latest 1.22 release or 1.24 even.

There have been a few memory leak fixes in various places.

1 Like

Yes. in gstreamer 1.24.2 there is no problem
Thanks

1 Like