GNOME Bugzilla – Bug 166362
data discarded by probes is leaked
Last modified: 2005-02-08 09:46:57 UTC
When you have a probe hooked up to a pad, and the probe callback returns FALSE, the data is not to be sent on and is to be discarded. While the data is actually not processed any further when a probe callback returns FALSE, the data is never actually freed. This causes massive memory leaks in a pipeline of mine (about 500MB/sec). Test program to demonstrate the bug attached. Patch to fix the problem attached as well (however, note added FIXME in gst_pad_pull() - I'm not 100% sure if it needs to be freed there as well). Cheers -Tim
Created attachment 37022 [details] Small program that demonstrates the problem
Created attachment 37023 [details] [review] proposed patch
Created attachment 37102 [details] [review] updated Data should also be discarded after pull dispatching blocks, here's an update to Tim's patch.
The alternative would be to unref the data in the callback handler which is not a good idea because there might be other callbacks registered as a probe. This solution is therefore the best. The documentation is not clear about this, can you update it so that it clearly states that the data will be unreffed at the end of the dispatching of all handlers.
Where is that documented?
Ronald -> the api docs ? commited to cvs, fixed