From 69e3639c96062cb0199182e3416da26966091e24 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 15 Mar 2012 00:24:40 +0100 Subject: [PATCH] query: fix copy function Copy the structure too. --- gst/gstquery.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/gstquery.c b/gst/gstquery.c index 6af3fd0745..ec2796e6aa 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -220,8 +220,13 @@ static GstQuery * _gst_query_copy (GstQuery * query) { GstQuery *copy; + GstStructure *s; - copy = gst_query_new_custom (query->type, GST_QUERY_STRUCTURE (query)); + s = GST_QUERY_STRUCTURE (query); + if (s) { + s = gst_structure_copy (s); + } + copy = gst_query_new_custom (query->type, s); return copy; }