GStreamer memory leak after pipeline restart

Stivius maxim11853 at gmail.com
Fri Apr 26 11:05:31 UTC 2019


I had several video playing concurrently in my original app (started at 300
MiB and increased to 1 GiB usage after a couple of restarts). They should be
restarted (unref the whole pipeline and create again) every N minutes. After
the 3rd or the 4th restart, the memory consumption was increased up to 6-7
GiB and drop back again to 1 GiB. It happened several times. So it's not a
typical memory leak but I don't know why it started at 300 MiB, increased to
1 GiB and fluctuated between 6-7 and 1 GiB.

So I decided to create 2 simple tests. 

*The 1st test:*
What I was testing: simple video 114.8 MiB length and duration almost 5
minutes.
What was the problem: memory usage starts at 62.2 MiB and increased to 88
MiB after 1st play. When the video was reloaded and pipeline restarted
(unrefed and created again) then memory usage remained 88 MiB and continue
increasing up to 105 MiB where it remained stable for the rest of testing
time.



*The 2nd test* is not even related to the pipeline but to GstDiscoverer
which I was using as well in my original app.
What I was testing: simple GstDiscoverer plugin
What was the problem: memory started at 19.2 MiB and increased to 100 MiB
where remained stable for the rest of testing time;




Conclusion: it's not a real memory leak but I want to know why it
continuously increasing memory to some "magic bound". In the original app,
it was even weirder because it was fluctuating between 1 GiB and 6-7 GiB
event if I unrefed all the resources.

*Maybe, GStreamer uses some internal pool or cache that it doesn't free even
after pipeline unref. Any suggestions?
*



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list