From 617a8b38113e06cdd4dfcba2713eac1c08e633fd Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Thu, 29 Mar 2012 17:08:49 +0200 Subject: [PATCH] query: parsing allocation query need not provide reffed caps ... in line with other query parsing function. --- gst/gstquery.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/gstquery.c b/gst/gstquery.c index cda44a97ea..fbe6d8c545 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -1489,7 +1489,7 @@ gst_query_new_allocation (GstCaps * caps, gboolean need_pool) /** * gst_query_parse_allocation: * @query: a #GstQuery - * @caps: (out callee-allocates) (allow-none): The #GstCaps + * @caps: (out transfer none) (allow-none): The #GstCaps * @need_pool: (out) (allow-none): Whether a #GstBufferPool is needed * * Parse an allocation query, writing the requested caps in @caps and @@ -1505,8 +1505,11 @@ gst_query_parse_allocation (GstQuery * query, GstCaps ** caps, g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_ALLOCATION); structure = GST_QUERY_STRUCTURE (query); + if (caps) { + *caps = g_value_get_boxed (gst_structure_id_get_value (structure, + GST_QUARK (CAPS))); + } gst_structure_id_get (structure, - GST_QUARK (CAPS), GST_TYPE_CAPS, caps, GST_QUARK (NEED_POOL), G_TYPE_BOOLEAN, need_pool, NULL); }