mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
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.
This commit is contained in:
parent
3c9dfaea38
commit
f23db94fef
1 changed files with 1 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue