mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
utils: defer getting the classes until we actualy need them
This function has a lot of early returns. Give them soem more benefit.
This commit is contained in:
parent
5fa9d942e3
commit
3c09381cef
1 changed files with 3 additions and 3 deletions
|
@ -1579,9 +1579,6 @@ gst_element_link_pads (GstElement * src, const gchar * srcpadname,
|
|||
g_return_val_if_fail (GST_IS_ELEMENT (src), FALSE);
|
||||
g_return_val_if_fail (GST_IS_ELEMENT (dest), FALSE);
|
||||
|
||||
srcclass = GST_ELEMENT_GET_CLASS (src);
|
||||
destclass = GST_ELEMENT_GET_CLASS (dest);
|
||||
|
||||
GST_CAT_INFO (GST_CAT_ELEMENT_PADS,
|
||||
"trying to link element %s:%s to element %s:%s", GST_ELEMENT_NAME (src),
|
||||
srcpadname ? srcpadname : "(any)", GST_ELEMENT_NAME (dest),
|
||||
|
@ -1764,6 +1761,9 @@ gst_element_link_pads (GstElement * src, const gchar * srcpadname,
|
|||
destpad = NULL;
|
||||
}
|
||||
|
||||
srcclass = GST_ELEMENT_GET_CLASS (src);
|
||||
destclass = GST_ELEMENT_GET_CLASS (dest);
|
||||
|
||||
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
|
||||
"we might have request pads on both sides, checking...");
|
||||
srctempls = gst_element_class_get_pad_template_list (srcclass);
|
||||
|
|
Loading…
Reference in a new issue