summaryrefslogtreecommitdiff
path: root/gst/gstquery.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2012-07-10 10:31:00 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2012-07-10 10:31:00 +0200
commit82eb275ef93ab8798a289c79fc2633289253fe83 (patch)
tree690939bb1cfb15aeafe6b6bd769eddbd6c86cfe1 /gst/gstquery.c
parent77bc2170f8cd8a0729fc1268ce821cabcb70e2fc (diff)
downloadgstreamer-82eb275ef93ab8798a289c79fc2633289253fe83.tar.gz
query: copy structure in _add_allocation_meta()
Make gst_query_add_allocation_meta() take a copy of the passed caps instead of taking ownership. This makes it easier for the caller in most cases because it doesn't have to make a copy and deal with NULL values.
Diffstat (limited to 'gst/gstquery.c')
-rw-r--r--gst/gstquery.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/gstquery.c b/gst/gstquery.c
index 9e518a0326..e9b42a8d7a 100644
--- a/gst/gstquery.c
+++ b/gst/gstquery.c
@@ -1675,13 +1675,13 @@ allocation_meta_free (AllocationMeta * am)
* gst_query_add_allocation_meta:
* @query: a GST_QUERY_ALLOCATION type query #GstQuery
* @api: the metadata API
- * @params: (transfer full) (allow-none): API specific parameters
+ * @params: (transfer none) (allow-none): API specific parameters
*
* Add @api with @params as one of the supported metadata API to @query.
*/
void
gst_query_add_allocation_meta (GstQuery * query, GType api,
- GstStructure * params)
+ const GstStructure * params)
{
GArray *array;
GstStructure *structure;
@@ -1697,7 +1697,7 @@ gst_query_add_allocation_meta (GstQuery * query, GType api,
(GDestroyNotify) allocation_meta_free);
am.api = api;
- am.params = params;
+ am.params = (params ? gst_structure_copy (params) : NULL);
g_array_append_val (array, am);
}