gst/gstghostpad.c (gst_ghost_pad_construct): If we got a template via g_object_get(), be sure to unref it.

Original commit message from CVS:
2008-10-08  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (gst_ghost_pad_construct): If we got a
template via g_object_get(), be sure to unref it.

* gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): Fix incorrect doc.
This commit is contained in:
Andy Wingo 2008-10-08 08:54:55 +00:00
parent c64e9b0c7a
commit 83d3b5d88e
2 changed files with 4 additions and 2 deletions

View file

@ -146,10 +146,10 @@ typedef struct _GstBufferClass GstBufferClass;
* @buf: a #GstBuffer.
*
* A pointer to a function that will be called on the buffer's malloc_data when
* this buffer is finalized. Defaults to g_free() if NULL.
* this buffer is finalized. Defaults to g_free().
*
* Note that the free function only affects the buffer's malloc_data; if the
* buffer's malloc_data is NULL, the function will not be called.
* buffer's malloc_data is %NULL, the function will not be called.
*
* Since: 0.10.22
*/

View file

@ -816,6 +816,8 @@ gst_ghost_pad_construct (GstGhostPad * gpad)
internal =
g_object_new (GST_TYPE_PROXY_PAD, "name", NULL,
"direction", otherdir, "template", templ, NULL);
/* release ref obtained via g_object_get */
gst_object_unref (templ);
} else {
internal =
g_object_new (GST_TYPE_PROXY_PAD, "name", NULL,