GNOME Bugzilla – Bug 322667
[jpegenc] leaks input buffer
Last modified: 2005-11-28 16:57:20 UTC
Jpeg encoder has serious memory leaks. Steps to reproduce: gst-launch videotestsrc ! jpegenc ! fakesink wait.... (or use valgrind)
Created attachment 55325 [details] [review] Leak fixes This patch also make use of gst_pad_alloc_buffer
Fixed in CVS, incl. miscellaneous other clean-ups: 2005-11-28 Tim-Philipp Müller <tim at centricular dot net> * ext/jpeg/gstjpegenc.c: (gst_jpegenc_resync), (gst_jpegenc_chain), (gst_jpegenc_set_property), (gst_jpegenc_get_property), (gst_jpegenc_change_state): Don't leak input buffer in chain function (fixes #322667); make state change function thread-safe; don't repeat the current function name in GST_DEBUG statements; use GST_ROUND_UP_* macros; use gst_pad_alloc_buffer(); misc. minor cleanups. (Thanks for the patch; I've committed something very similar, only that you still need to unref the input buffer if gst_pad_alloc_buffer() returns something else than GST_FLOW_OK).