Commit 73e91b2c authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

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

parent e017498c
...@@ -2122,7 +2122,7 @@ gst_query_has_scheduling_mode (GstQuery * query, GstPadMode mode) ...@@ -2122,7 +2122,7 @@ gst_query_has_scheduling_mode (GstQuery * query, GstPadMode mode)
/** /**
* gst_query_new_accept_caps: * gst_query_new_accept_caps:
* @caps: a #GstCaps * @caps: a fixed #GstCaps
* *
* Constructs a new query object for querying if @caps are accepted. * Constructs a new query object for querying if @caps are accepted.
* *
...@@ -2136,6 +2136,8 @@ gst_query_new_accept_caps (GstCaps * caps) ...@@ -2136,6 +2136,8 @@ gst_query_new_accept_caps (GstCaps * caps)
GstQuery *query; GstQuery *query;
GstStructure *structure; GstStructure *structure;
g_return_val_if_fail (gst_caps_is_fixed (caps), NULL);
structure = gst_structure_new_id (GST_QUARK (QUERY_ACCEPT_CAPS), structure = gst_structure_new_id (GST_QUARK (QUERY_ACCEPT_CAPS),
GST_QUARK (CAPS), GST_TYPE_CAPS, caps, GST_QUARK (CAPS), GST_TYPE_CAPS, caps,
GST_QUARK (RESULT), G_TYPE_BOOLEAN, FALSE, NULL); GST_QUARK (RESULT), G_TYPE_BOOLEAN, FALSE, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment