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 333345 - [lame] fix some memory leaks
[lame] fix some memory leaks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other All
: Normal normal
: 0.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-04 11:36 UTC by Christophe Fergeau
Modified: 2006-03-15 13:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Fix leaks (3.38 KB, patch)
2006-03-04 11:37 UTC, Christophe Fergeau
committed Details | Review

Description Christophe Fergeau 2006-03-04 11:36:27 UTC
Please describe the problem:
In simple uses (create a pipeline, iterate until EOS, set state to None, iterate
again, set state to None, unref the pipeline), lame leaks some memory. The
attached patch fixes those leaks. I'm not familiar with gstreamer 0.10, so it
needs to be looked at carefully in case I'm doing something stupid ;) But
valgrind seems happy with it. The bad news is that libmp3lame seems to be
leaking in some conditions as well :(

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Christophe Fergeau 2006-03-04 11:37:08 UTC
Created attachment 60628 [details] [review]
Fix leaks
Comment 2 Tim-Philipp Müller 2006-03-15 13:44:12 UTC
Thanks, committed:

 2006-03-15  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Christophe Fergeau  <teuf gnome org>

        * ext/lame/gstlame.c: (gst_lame_release_memory),
        (gst_lame_finalize), (gst_lame_class_init),
        (gst_lame_sink_setcaps), (gst_lame_init), (gst_lame_sink_event),
        (gst_lame_change_state):
          Fix some memory leaks (#333345), use GST_DEBUG_FUNCPTR more often.

with the following minor modifications:
  - moved the gst_object_unref() added in sink_setcaps() after the
    GST_ELEMENT_ERROR macro, as the object is still used as first arg
  - used gst_pad_new_from_static_template()