diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-01-23 11:37:45 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-01-23 11:37:45 +0100 |
commit | 8dd3c2d543e7a195a280549f05e7fac69f52f30b (patch) | |
tree | 7fb25faaab9912bf1c16750096b6c819646550ca | |
parent | a7f2540f779c71f95a49002309f68befd01091bf (diff) |
Use more performant link function
We can use gst_element_link_pads() instead of the more generic
gst_element_link() function because we know the pads. This saves some cycles
because the more generic function needs to search for possible compatible caps
etc.
-rw-r--r-- | gst/playback/gsturidecodebin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c index 9f917ae9..ab34236f 100644 --- a/gst/playback/gsturidecodebin.c +++ b/gst/playback/gsturidecodebin.c @@ -1160,12 +1160,12 @@ type_found (GstElement * typefind, guint probability, gst_bin_add (GST_BIN_CAST (decoder), queue); - if (!gst_element_link (typefind, queue)) + if (!gst_element_link_pads (typefind, "src", queue, "sink")) goto could_not_link; g_object_set (G_OBJECT (dec_elem), "sink-caps", caps, NULL); - if (!gst_element_link (queue, dec_elem)) + if (!gst_element_link_pads (queue, "src", dec_elem, "sink")) goto could_not_link; gst_element_set_state (dec_elem, GST_STATE_PLAYING); |