[gstreamer-bugs] [Bug 536475] New: gdppay memleak and possible crash

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Jun 3 10:52:47 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=536475

  GStreamer | gst-plugins-base | Ver: HEAD CVS
           Summary: gdppay memleak and possible crash
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: critical
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: hexa00 at gmail.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


If gst_gdp_pay_reset_streamheader is called multiple times due to a change of
caps 

The new_segment_buf will make a copy of last new_segment_buf to set as
streamheader

Then the caps are created with the streamheader containing the copy of the
new_segment_buf

And these caps are set on the new_segment_buf
And it's sent..

This is ok for the first time the _reset fonction is called...

But after that since this->new_segment_buf exists and it's caps are set with a
streamheader
When the copy of the new_segment_buf is made , it copies the caps too
and these caps contain a reference to the last new_segment_buf copy
thus each call to _reset will ref the previous new_segment_buf copy

Repeating this multiple times causes a buffer leak .. and in my case a stack 
crash when it tries to unref all thoses buffer...

This could also apply in different ways to caps_buf and tag_buf...
(By having multiple newsegment or tag events)

Patched by setting to NULL the caps of the copyed buffer


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=536475.




More information about the Gstreamer-bugs mailing list