diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c index af2f3b203a..0b10519389 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c @@ -7513,7 +7513,8 @@ on_rtpbin_request_aux_sender (GstElement * rtpbin, guint session_id, GstPad *sinkpad = gst_element_get_static_pad (aux_sender, "sink"); GstPad *srcpad = gst_element_get_static_pad (aux_sender, "src"); - gst_object_ref_sink (aux_sender); + if (g_object_is_floating (aux_sender)) + aux_sender = gst_object_ref_sink (aux_sender); if (!sinkpad || !srcpad) { GST_ERROR_OBJECT (webrtc,