From dc520c11bc1de00281526a3b85fc62ae510599d9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 18 May 2011 18:48:03 +0200 Subject: [PATCH] query: add allocation query name Add ALLOCATION query name and guard some functions against invalid queries. --- gst/gstquery.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/gstquery.c b/gst/gstquery.c index c994665..37692c2 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -103,6 +103,7 @@ static GstQueryTypeDefinition standard_definitions[] = { {GST_QUERY_BUFFERING, "buffering", "Buffering status", 0}, {GST_QUERY_CUSTOM, "custom", "Custom query", 0}, {GST_QUERY_URI, "uri", "URI of the source or sink", 0}, + {GST_QUERY_ALLOCATION, "allocation", "Allocation properties", 0}, {0, NULL, NULL, 0} }; @@ -150,6 +151,7 @@ gst_query_type_get_name (GstQueryType query) const GstQueryTypeDefinition *def; def = gst_query_type_get_details (query); + g_return_val_if_fail (def != NULL, NULL); return def->nick; } @@ -168,6 +170,7 @@ gst_query_type_to_quark (GstQueryType query) const GstQueryTypeDefinition *def; def = gst_query_type_get_details (query); + g_return_val_if_fail (def != NULL, 0); return def->quark; } -- 2.7.4