From eb9c8bdf66695d5ad5271ea5936ce4dd4076bbdb Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Tue, 13 Dec 2016 23:25:39 -0800 Subject: [PATCH] gstpad: only warn on performance penalty if not using the template caps After b76ecfd992b0d3a423cc9ace5539ecd2ba509d41 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 --- gst/gstpad.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gst/gstpad.c b/gst/gstpad.c index 9eab2413ff..e6bcaa8b00 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -3077,12 +3077,13 @@ gst_pad_query_accept_caps_default (GstPad * pad, GstQuery * query) gst_query_parse_accept_caps (query, &caps); if (!allowed) { - GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, pad, - "fallback ACCEPT_CAPS query, consider implementing a specialized version"); - if (GST_PAD_IS_ACCEPT_TEMPLATE (pad)) + if (GST_PAD_IS_ACCEPT_TEMPLATE (pad)) { allowed = gst_pad_get_pad_template_caps (pad); - else + } else { + GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, pad, + "fallback ACCEPT_CAPS query, consider implementing a specialized version"); allowed = gst_pad_query_caps (pad, caps); + } } if (allowed) {