query: Only allow fixed caps in the accept-caps query

This commit is contained in:
Sebastian Dröge 2012-03-21 09:00:45 +01:00
parent e017498cb0
commit 73e91b2ce3

View file

@ -2122,7 +2122,7 @@ gst_query_has_scheduling_mode (GstQuery * query, GstPadMode mode)
/**
* gst_query_new_accept_caps:
* @caps: a #GstCaps
* @caps: a fixed #GstCaps
*
* Constructs a new query object for querying if @caps are accepted.
*
@ -2136,6 +2136,8 @@ gst_query_new_accept_caps (GstCaps * caps)
GstQuery *query;
GstStructure *structure;
g_return_val_if_fail (gst_caps_is_fixed (caps), NULL);
structure = gst_structure_new_id (GST_QUARK (QUERY_ACCEPT_CAPS),
GST_QUARK (CAPS), GST_TYPE_CAPS, caps,
GST_QUARK (RESULT), G_TYPE_BOOLEAN, FALSE, NULL);