From f5adfaed23ee127dcbb31d122628cddbcad288a4 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 2 Aug 2010 12:46:20 +0200 Subject: [PATCH] tests: rtp payloading: fix pad leak --- tests/check/elements/rtp-payloading.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/check/elements/rtp-payloading.c b/tests/check/elements/rtp-payloading.c index 4502fb87c..3d20f9b1d 100644 --- a/tests/check/elements/rtp-payloading.c +++ b/tests/check/elements/rtp-payloading.c @@ -321,6 +321,8 @@ rtp_pipeline_run (rtp_pipeline * p) static void rtp_pipeline_enable_lists (rtp_pipeline * p, guint mtu_size) { + GstPad *pad; + /* use buffer lists */ g_object_set (p->rtppay, "buffer-list", TRUE, NULL); @@ -330,8 +332,10 @@ rtp_pipeline_enable_lists (rtp_pipeline * p, guint mtu_size) } /* Add chain list function for the buffer list tests */ - gst_pad_set_chain_list_function (gst_element_get_static_pad (p->rtpdepay, - "sink"), GST_DEBUG_FUNCPTR (rtp_pipeline_chain_list)); + pad = gst_element_get_static_pad (p->rtpdepay, "sink"); + gst_pad_set_chain_list_function (pad, + GST_DEBUG_FUNCPTR (rtp_pipeline_chain_list)); + gst_object_unref (pad); } /* -- 2.34.1