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 322667 - [jpegenc] leaks input buffer
[jpegenc] leaks input buffer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.9.x
Other Linux
: Normal normal
: 0.9.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-11-28 16:12 UTC by Michal Benes
Modified: 2005-11-28 16:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Leak fixes (1.46 KB, patch)
2005-11-28 16:16 UTC, Michal Benes
none Details | Review

Description Michal Benes 2005-11-28 16:12:17 UTC
Jpeg encoder has serious memory leaks.

Steps to reproduce:
gst-launch videotestsrc ! jpegenc ! fakesink
wait.... (or use valgrind)
Comment 1 Michal Benes 2005-11-28 16:16:24 UTC
Created attachment 55325 [details] [review]
Leak fixes

This patch also make use of gst_pad_alloc_buffer
Comment 2 Tim-Philipp Müller 2005-11-28 16:57:20 UTC
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).