GNOME Bugzilla – Bug 653925
mpegtsparse eats input buffers
Last modified: 2011-11-03 22:39:29 UTC
I noticed that mpegtsparse does not always unref deliverd input buffers coming from a src element. This happens after some minutes delivering a live TV stream. So after a while a lot of memory gets lost. Buffer size is 80 KB. But happens with other buffer sizes as well. I could monitor this as I delivered the Gst Buffers with my own malloc Free function. Gstreamer version is 0.10.34, gst plugins bad is 0.10.22
Maybe you could run a gst-launch-0.10 pipeline through valgrind (set num-buffers on the source to make it eos out naturally) like this: $ G_SLICE=always-malloc valgrind --leak-check=yes /usr/bin/gst-launch-0.10 yoursource num-buffers=100000 ! mpegtsparse ! fakesink
After playing around I think I understand a little bit more what is happening. When I have a good reception and the incoming transport stream has no errors all works fine. The transport stream parser just keeps 2-4 GstBuffer Objects referenced. But if I have poor reception and the incoming transport stream contains uncorrected errors, the number of not completly unref. GstBuffers increases. Just I was not able to detect this as memory leaks with OSX Instruments. What could mean that the pointer to the GstBuffer Objects are still vaild somewhere, and just a simple unref while the filters are in play mode is missing in case of ts errors.
Roland, can you get us a valgrind output and reopen this issue? Thanks in advance.