summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOgnyan Tonchev <ognyan@axis.com>2014-09-17 16:37:11 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-09-19 09:38:57 +0300
commitf4e42e22949c5b1aa4e47d6183e6319cd5f1e5f5 (patch)
tree362a87eb7347ed53c7ec5fe83bf1b701f2f2dde0
parent95b6bab3cfccaa80ddef1a91fbedd7f783db82bd (diff)
rtpbin: do not leak encsink pad in error case
https://bugzilla.gnome.org/show_bug.cgi?id=736807
-rw-r--r--gst/rtpmanager/gstrtpbin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index 9b1b86a9f..32472d92d 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -3663,16 +3663,16 @@ create_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
GstPadLinkReturn ret;
GST_DEBUG_OBJECT (rtpbin, "linking RTCP encoder");
- ename = g_strdup_printf ("rtcp_sink_%d", sessid);
- encsink = gst_element_get_static_pad (encoder, ename);
- g_free (ename);
+
ename = g_strdup_printf ("rtcp_src_%d", sessid);
encsrc = gst_element_get_static_pad (encoder, ename);
g_free (ename);
-
if (encsrc == NULL)
goto enc_src_failed;
+ ename = g_strdup_printf ("rtcp_sink_%d", sessid);
+ encsink = gst_element_get_static_pad (encoder, ename);
+ g_free (ename);
if (encsink == NULL)
goto enc_sink_failed;