From 1ecb27f221d800b203b74052d4f1d21a31a5eb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 6 Feb 2020 14:22:17 +0200 Subject: [PATCH] webrtc/transportsendbin: Clean up pad probe removal We already have a helper function for this so just use it instead of duplicating it. --- ext/webrtc/transportsendbin.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/ext/webrtc/transportsendbin.c b/ext/webrtc/transportsendbin.c index 36522d3361..7939b8e8e9 100644 --- a/ext/webrtc/transportsendbin.c +++ b/ext/webrtc/transportsendbin.c @@ -81,7 +81,6 @@ enum #define TSB_UNLOCK(tsb) (g_mutex_unlock (TSB_GET_LOCK(tsb))) static void cleanup_blocks (TransportSendBin * send); -static void tsb_remove_probe (struct pad_block *block); static void _set_rtcp_mux (TransportSendBin * send, gboolean rtcp_mux) @@ -174,15 +173,6 @@ block_peer_pad (GstElement * elem, const gchar * pad_name) return block; } -static void -tsb_remove_probe (struct pad_block *block) -{ - if (block && block->block_id) { - gst_pad_remove_probe (block->pad, block->block_id); - block->block_id = 0; - } -} - static GstStateChangeReturn transport_send_bin_change_state (GstElement * element, GstStateChange transition) @@ -247,12 +237,7 @@ transport_send_bin_change_state (GstElement * element, * if they still exist, without accidentally feeding data to the * dtlssrtpenc elements */ TSB_LOCK (send); - tsb_remove_probe (send->rtp_ctx.rtp_block); - tsb_remove_probe (send->rtp_ctx.rtcp_block); - tsb_remove_probe (send->rtp_ctx.nice_block); - - tsb_remove_probe (send->rtcp_ctx.rtcp_block); - tsb_remove_probe (send->rtcp_ctx.nice_block); + cleanup_blocks (send); TSB_UNLOCK (send); break; }