+2006-03-17 Wim Taymans <wim@fluendo.com>
+
+ * gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_alloc_buffer_full),
+ (gst_pad_push):
+ Don't leak buffers, caps and pads on negotiation errors.
+
2006-03-16 Stefan Kost <ensonic@users.sf.net>
* docs/faq/cvs.xml:
GST_OBJECT_UNLOCK (pad);
/* The current caps on a pad are trivially acceptable */
- if (existing && (caps == existing || gst_caps_is_equal (caps, existing)))
- goto is_same_caps;
+ if (existing) {
+ if (caps == existing || gst_caps_is_equal (caps, existing))
+ goto is_same_caps;
+ gst_caps_unref (existing);
+ }
if (G_LIKELY (acceptfunc)) {
/* we can call the function */
}
not_negotiated:
{
+ gst_buffer_unref (*buf);
+ *buf = NULL;
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"alloc function returned unacceptable buffer");
return GST_FLOW_NOT_NEGOTIATED;
}
not_negotiated:
{
+ gst_buffer_unref (buffer);
+ gst_object_unref (peer);
GST_CAT_DEBUG_OBJECT (GST_CAT_SCHEDULING, pad,
"element pushed buffer then refused to accept the caps");
return GST_FLOW_NOT_NEGOTIATED;