mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
pad: Add a filter to the caps_query done by acceptcaps
Use the caps that the pad is asked to accept as filter for the query https://bugzilla.gnome.org/show_bug.cgi?id=702632
This commit is contained in:
parent
12a72d2b08
commit
1815e6067a
1 changed files with 2 additions and 2 deletions
|
@ -2820,15 +2820,15 @@ gst_pad_query_accept_caps_default (GstPad * pad, GstQuery * query)
|
||||||
GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, pad,
|
GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, pad,
|
||||||
"fallback ACCEPT_CAPS query, consider implementing a specialized version");
|
"fallback ACCEPT_CAPS query, consider implementing a specialized version");
|
||||||
|
|
||||||
allowed = gst_pad_query_caps (pad, NULL);
|
|
||||||
gst_query_parse_accept_caps (query, &caps);
|
gst_query_parse_accept_caps (query, &caps);
|
||||||
|
allowed = gst_pad_query_caps (pad, caps);
|
||||||
|
|
||||||
if (allowed) {
|
if (allowed) {
|
||||||
GST_DEBUG_OBJECT (pad, "allowed caps %" GST_PTR_FORMAT, allowed);
|
GST_DEBUG_OBJECT (pad, "allowed caps %" GST_PTR_FORMAT, allowed);
|
||||||
result = gst_caps_is_subset (caps, allowed);
|
result = gst_caps_is_subset (caps, allowed);
|
||||||
gst_caps_unref (allowed);
|
gst_caps_unref (allowed);
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (pad, "no caps allowed on the pad");
|
GST_DEBUG_OBJECT (pad, "no compatible caps allowed on the pad");
|
||||||
result = FALSE;
|
result = FALSE;
|
||||||
}
|
}
|
||||||
gst_query_set_accept_caps_result (query, result);
|
gst_query_set_accept_caps_result (query, result);
|
||||||
|
|
Loading…
Reference in a new issue