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 710881 - memory leaks in hlsdemux
memory leaks in hlsdemux
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.2.0
Other All
: Normal normal
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-25 14:53 UTC by A Ashley
Modified: 2013-10-26 02:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes three memory leaks in hlsdemux (3.54 KB, patch)
2013-10-25 15:00 UTC, A Ashley
committed Details | Review

Description A Ashley 2013-10-25 14:53:55 UTC
During normal operation hlsdemux is leaking memory. On the embedded device that I am developing for, this causes gstreamer to die after about 15 minutes of 1.5mbps video. Checking with valgrind on a Linux desktop I can see a "possibly lost" of several MB of memory that it is allocated in hlsdemux.

The problem is that gst_hls_demux_get_next_fragment function calls gst_fragment_get_buffer which increments the reference count on the buffer but gst_hls_demux_get_next_fragment never calls unref on the buffer. This means that the reference count for each downloaded fragment never gets to zero and so its memory is never released.

I will attach a patch (against 1.2.0) that fixes this, plus two other very minor leaks that I've found. I have also checked git head and the bug is present there as well.
Comment 1 A Ashley 2013-10-25 15:00:21 UTC
Created attachment 258130 [details] [review]
fixes three memory leaks in hlsdemux

This patch fixes three memory leaks in hlsdemux, one that occurs during normal operation and two that occur during error conditions.
Comment 2 Thiago Sousa Santos 2013-10-26 02:26:39 UTC
Fixed by this commit

commit 58072914fabf872b46b4787c190401acbed24c64
Author: Alex Ashley <bugzilla@ashley-family.net>
Date:   Fri Oct 25 11:11:30 2013 +0100