After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 474880 - [xvimagesink] [ximagesink] leaking buffer caps reference
[xvimagesink] [ximagesink] leaking buffer caps reference
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal minor
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-09-08 15:59 UTC by René Stadler
Modified: 2007-09-09 10:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make xvimagesink buffer objects invoke parent class finalize vmethod (1.00 KB, patch)
2007-09-08 16:02 UTC, René Stadler
committed Details | Review
Make ximagesink buffer objects invoke parent class finalize vmethod (1.00 KB, patch)
2007-09-08 16:02 UTC, René Stadler
committed Details | Review

Description René Stadler 2007-09-08 15:59:34 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.

Attaching patches.
Comment 1 René Stadler 2007-09-08 16:02:14 UTC
Created attachment 95174 [details] [review]
Make xvimagesink buffer objects invoke parent class finalize vmethod
Comment 2 René Stadler 2007-09-08 16:02:47 UTC
Created attachment 95175 [details] [review]
Make ximagesink buffer objects invoke parent class finalize vmethod
Comment 3 Sebastian Dröge (slomo) 2007-09-09 10:25:15 UTC
Fixed... thanks for the patches :)

2007-09-09  Sebastian Dröge  <slomo@circular-chaos.org>

        Patch by: René Stadler <mail at renestadler dot de>

        * sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize),
        (gst_ximage_buffer_class_init):
        * sys/xvimage/xvimagesink.c: (gst_xvimage_buffer_destroy),
        (gst_xvimage_buffer_class_init):
        Correctly chain up finalize with the parent class to prevent
        memory leaks. Fixes #474880.