GNOME Bugzilla – Bug 333001
Memory leak in ffmpegenc
Last modified: 2006-03-01 15:06:01 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.
Created attachment 60404 [details] [review] Fix memory leak
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