GNOME Bugzilla – Bug 474880
[xvimagesink] [ximagesink] leaking buffer caps reference
Last modified: 2007-09-09 10:25:15 UTC
Yesterday, Stefan said on IRC that he found a leaked caps using valgrind in conjunction with xvimagesink usage.
I found out that ximagesink is also affected. I tracked the problem down to the fact that the custom GstBuffer subclasses that these elements use do not chain up to the parent class' "finalize" vmethod. This results in buffer->caps and buffer->malloc_data never being freed on buffer object destruction.
Created attachment 95174 [details] [review]
Make xvimagesink buffer objects invoke parent class finalize vmethod
Created attachment 95175 [details] [review]
Make ximagesink buffer objects invoke parent class finalize vmethod
Fixed... thanks for the patches :)
2007-09-09 Sebastian Dröge <firstname.lastname@example.org>
Patch by: René Stadler <mail at renestadler dot de>
* sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize),
* sys/xvimage/xvimagesink.c: (gst_xvimage_buffer_destroy),
Correctly chain up finalize with the parent class to prevent
memory leaks. Fixes #474880.