gstpad: only warn on performance penalty if not using the template caps

After b76ecfd992 introduced
GST_PAD_FLAG_ACCEPT_TEMPLATE, the performance penalty this
message is refering to (the cascading ACCEPT_CAPS query)
only applies to the cases where !GST_PAD_IS_ACCEPT_TEMPLATE
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2016-12-13 23:25:39 -08:00
parent 3fab00b46a
commit eb9c8bdf66

View file

@ -3077,13 +3077,14 @@ gst_pad_query_accept_caps_default (GstPad * pad, GstQuery * query)
gst_query_parse_accept_caps (query, &caps);
if (!allowed) {
if (GST_PAD_IS_ACCEPT_TEMPLATE (pad)) {
allowed = gst_pad_get_pad_template_caps (pad);
} else {
GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, pad,
"fallback ACCEPT_CAPS query, consider implementing a specialized version");
if (GST_PAD_IS_ACCEPT_TEMPLATE (pad))
allowed = gst_pad_get_pad_template_caps (pad);
else
allowed = gst_pad_query_caps (pad, caps);
}
}
if (allowed) {
if (GST_PAD_IS_ACCEPT_INTERSECT (pad)) {