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 333001 - Memory leak in ffmpegenc
Memory leak in ffmpegenc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal critical
: 0.10.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-01 14:49 UTC by Josef Zlomek
Modified: 2006-03-01 15:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix memory leak (1.46 KB, patch)
2006-03-01 14:50 UTC, Josef Zlomek
none Details | Review

Description Josef Zlomek 2006-03-01 14:49:42 UTC
When new buffer is appended to the cache in gst_ffmpegenc_chain_audio, the function gst_buffer_span() is used. But gst_buffer_span() does not unref the source buffers (its arguments), and the buffers are never unref'd.
Since (almost) all buffers (smaller than frame size) go to cache, the memory leak is quite severe.

The atached patch uses gst_buffer_join() for adding buffers to the cache because
gst_buffer_join() unrefs its arguments. Therefore, the patch fixes the memory leak.
Comment 1 Josef Zlomek 2006-03-01 14:50:10 UTC
Created attachment 60404 [details] [review]
Fix memory leak
Comment 2 Edward Hervey 2006-03-01 15:06:01 UTC
Fixed, thanks a lot.

2006-03-01  Josef Zlomek  <josef dot zlomek at itonis dot tv>

	Reviewed by : Edward Hervey  <edward@fluendo.com>

	* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_chain_audio):
	Fix segmentation fault and memleak.
	Fixes #332995 and #333001