Huge memory leak sometime after starting a pipeline
Chris Tapp
opensource at keylevel.com
Wed Nov 5 13:26:00 PST 2014
My application uses gst_parse_launch to create a pipleline of the form:
playbin av-offset=-50000000 buffer-size=0 buffer-duration=0 name="name" uri=http://dvb:4242/bysid/4352 audio-sink="alsasink" video-sink="videoconvert ! videoscale ! video/x-raw,format=(string)RGBA,width=300,height=200 ! fakesink sync=true
It then uses the pipeline "sample" property to read frames as required.
This generally works fine, but after some time (from a few minutes to many hours) a memory leak develops which leads to the program being terminated. The application itself processes all samples the same (basically copies the image to a gl texture without holding any references and no control-flow variations).
Examining the log created with GST_DEBUG=GST_MEMORY:5 for a particular run shows that the number of calls to _gst_memory_init and _gst_memory_free are basically the same when the application works normally, but there is a significant deficit of calls to _gst_memory_free when it goes wrong:
Timestamp
0:36:45 50 more _init than _free
0:52:43 61 more _init than _free
0:59:45 55 more _init than _free
1:09:00 76796 more _init than _free
How should I go about trying to work out what's going on?
--
Chris Tapp
opensource at keylevel.com
www.keylevel.com
----
You can tell you're getting older when your car insurance gets real cheap!
More information about the gstreamer-devel
mailing list