mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
query: Only allow fixed caps in the accept-caps query
This commit is contained in:
parent
e017498cb0
commit
73e91b2ce3
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue