mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
GstPad: Do not call gst_pad_accept_caps() when caps change
Instead just check that the caps intersect with the pad template. The elements should properly accept/refuse the caps in setcaps(). Shaves off calling the default implementation of acceptcaps which does an expensive gst_pad_get_caps() (so if you have 50 of those elements in a row, you'd be doing factorial(50) gst_pad_get_caps...). Does not break any module unit test and most apps work fine. https://bugzilla.gnome.org/show_bug.cgi?id=622740
This commit is contained in:
parent
5b40ebbceb
commit
7fa58dbebd
1 changed files with 1 additions and 1 deletions
|
@ -2706,7 +2706,7 @@ gst_pad_configure_sink (GstPad * pad, GstCaps * caps)
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
/* See if pad accepts the caps */
|
/* See if pad accepts the caps */
|
||||||
if (!gst_pad_accept_caps (pad, caps))
|
if (!gst_caps_can_intersect (caps, gst_pad_get_pad_template_caps (pad)))
|
||||||
goto not_accepted;
|
goto not_accepted;
|
||||||
|
|
||||||
/* set caps on pad if call succeeds */
|
/* set caps on pad if call succeeds */
|
||||||
|
|
Loading…
Reference in a new issue