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 733386 - appsrc: Leaking callback user data
appsrc: Leaking callback user data
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.4.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-19 01:20 UTC by Youness Alaoui
Modified: 2014-07-19 12:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to appsrc (1.00 KB, patch)
2014-07-19 01:20 UTC, Youness Alaoui
none Details | Review
appsrc: Fix memory leak with callback notify not being called in dispose (1.00 KB, patch)
2014-07-19 12:10 UTC, Youness Alaoui
committed Details | Review

Description Youness Alaoui 2014-07-19 01:20:42 UTC
Created attachment 281164 [details] [review]
Patch to appsrc

There's a memory leak in appsrc if a user calls gst_app_src_set_callbacks with a GDestroyNotify, as the destroy notify doesn't get called in the dispose. It does get called correctly with appsink, the bug is only in appsrc.
I've attached a patch that would fix it.
Patch also uploaded here : https://github.com/kakaroto/gst-plugins-base/commit/4db5bf4e52e8a4d053a6ca6be86e99c14d8e79dd
Comment 1 Youness Alaoui 2014-07-19 12:10:19 UTC
Created attachment 281177 [details] [review]
appsrc: Fix memory leak with callback notify not being called in dispose 

I hadn't noticed I had an old email as my user.email in the commit. 
Fixed it and attached new patch and updated my github branch :
https://github.com/kakaroto/gst-plugins-base/commit/538ed154ae90735b89d05e7ed8eb986f3880f35f
Comment 2 Sebastian Dröge (slomo) 2014-07-19 12:39:48 UTC
commit 6b0063aab52167cb67fd4106df9a64880e77482c
Author: Youness Alaoui <kakaroto@kakaroto.homelinux.net>
Date:   Fri Jul 18 21:19:03 2014 -0400

    appsrc: Fix memory leak with callback notify not being called in dispose
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733386