GNOME Bugzilla – Bug 693324
gdppay: leak when getting caps identical to your current ones
Last modified: 2013-02-07 14:11:34 UTC
Created attachment 235397 [details] [review] Patch which fixes the leak. This code leaks when the incoming caps are equal to this->caps; case GST_EVENT_CAPS:{ gst_event_parse_caps (event, &caps); if (this->caps == NULL || !gst_caps_is_equal (this->caps, caps)) { GST_INFO_OBJECT (pad, "caps changed to %" GST_PTR_FORMAT, caps); gst_buffer_replace (&outbuffer, NULL); gst_caps_replace (&this->caps, caps); outbuffer = gst_gdp_buffer_from_caps (this, caps); if (outbuffer == NULL) goto no_buffer_from_caps; GST_BUFFER_DURATION (outbuffer) = 0; GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER); if (this->caps_buf) gst_buffer_unref (this->caps_buf); this->caps_buf = outbuffer; gst_gdp_pay_reset_streamheader (this); } break; }
Thanks! commit c8cbe98d906664c488ef5ab43ae6d6aea46db94b Author: Tim 'mithro' Ansell <mithro@mithis.com> Date: Fri Feb 8 00:06:16 2013 +1100 gdppay: fix buffer leak when new caps are same as old caps The leak occurs when you got a message with identical caps to the ones you already had. https://bugzilla.gnome.org/show_bug.cgi?id=693324