[gstreamer-bugs] [Bug 385311] Memory leak initializing lame mp3 encoder plugin (gstlame.c)

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Dec 13 02:45:35 PST 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=385311

  GStreamer | gst-plugins-ugly | Ver: HEAD CVS


Tim-Philipp Müller changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #78257|0                           |1
        is obsolete|                            |




------- Comment #3 from Tim-Philipp Müller  2006-12-13 10:43 UTC -------
Created an attachment (id=78274)
 --> (http://bugzilla.gnome.org/attachment.cgi?id=78274&action=view)
updated patch, includes handling gst_lame_init() returning NULL

Thanks for the patch, will go in after the freeze.

> On a related point, lame_init() can return NULL in the event that it cannot
> allocate required memory. Thus, it might be nice to add a call to g_error()
> similar to:
> 
>    g_error ("%s: failed to allocate %lu bytes", G_STRLOC, n_bytes);
> 
> This would give an informative message rather than just seg faulting and would
> be more consistent with GStreamer's handling of out of memory conditions.

I think it would be better to just return FALSE from gst_lame_setup() so that
an error message is posted on the bus (whether that will succeed in a situation
like that is a different question, but we can at least try) and set a flag if
it fails in _init() so we can error out later.


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email




More information about the Gstreamer-bugs mailing list