From: Sjoerd Simons Date: Wed, 19 Jun 2013 10:30:47 +0000 (+0200) Subject: pad: Add a filter to the caps_query done by acceptcaps X-Git-Tag: 1.1.2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1815e6067a1077ddb92330b25f172da82f38a3e8;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/gst/gstpad.c b/gst/gstpad.c index 731fda2..c47a7fe 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2820,15 +2820,15 @@ gst_pad_query_accept_caps_default (GstPad * pad, GstQuery * query) GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, pad, "fallback ACCEPT_CAPS query, consider implementing a specialized version"); - allowed = gst_pad_query_caps (pad, NULL); gst_query_parse_accept_caps (query, &caps); + allowed = gst_pad_query_caps (pad, caps); if (allowed) { GST_DEBUG_OBJECT (pad, "allowed caps %" GST_PTR_FORMAT, allowed); result = gst_caps_is_subset (caps, allowed); gst_caps_unref (allowed); } else { - GST_DEBUG_OBJECT (pad, "no caps allowed on the pad"); + GST_DEBUG_OBJECT (pad, "no compatible caps allowed on the pad"); result = FALSE; } gst_query_set_accept_caps_result (query, result);