From f23db94fefd3174fc79242324bcd749436990f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 30 Mar 2013 11:47:29 +0100 Subject: [PATCH] pad: Let gst_pad_get_allowed_caps() pass the caps own caps as filter This will reduce the number of caps created downstream and we don't need to intersect in the very end with the pad's own caps. --- gst/gstpad.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gst/gstpad.c b/gst/gstpad.c index 8452a215af..152cb37dcb 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2479,7 +2479,6 @@ gst_pad_get_allowed_caps (GstPad * pad) { GstCaps *mycaps; GstCaps *caps; - GstCaps *peercaps; GstPad *peer; g_return_val_if_fail (GST_IS_PAD (pad), NULL); @@ -2495,11 +2494,9 @@ gst_pad_get_allowed_caps (GstPad * pad) GST_OBJECT_UNLOCK (pad); mycaps = gst_pad_query_caps (pad, NULL); - peercaps = gst_pad_query_caps (peer, NULL); + caps = gst_pad_query_caps (peer, mycaps); gst_object_unref (peer); - caps = gst_caps_intersect (mycaps, peercaps); - gst_caps_unref (peercaps); gst_caps_unref (mycaps); GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad, "allowed caps %" GST_PTR_FORMAT,