[Bug 676607] Mem leak on decodebin when mp3 codec is not available.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue May 29 22:03:25 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=676607
  GStreamer | gst-plugins-base | 0.10.35

Jun Zhu <bigbearzhujun> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Jun Zhu <bigbearzhujun at gmail.com> 2012-05-30 05:03:22 UTC ---
Found the reason. In some situation when a codec is not available, decodebin2
would change its state to NULL with some message unprocessed in its message
queue, which referring the decodebin2 itself and all its children. Patch below
will fix this issue:

diff --git a/gst/gstbin.c b/gst/gstbin.c
index f3d1b56..02c750d 100644
--- a/gst/gstbin.c
+++ b/gst/gstbin.c
@@ -2473,6 +2473,11 @@ gst_bin_change_state_func (GstElement * element,
GstStateChange transition)
           goto activate_failure;
       break;
     case GST_STATE_NULL:
+      /* Clear message list on next NULL */
+      GST_OBJECT_LOCK (bin);
+      GST_DEBUG_OBJECT (element, "clearing all cached messages before NULL");
+      bin_remove_messages (bin, NULL, GST_MESSAGE_ANY);
+      GST_OBJECT_UNLOCK (bin);
       if (current == GST_STATE_READY)
         if (!(gst_bin_src_pads_activate (bin, FALSE)))
           goto activate_failure;

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list