From eab93838129fad12a594336597ddd687f45348f8 Mon Sep 17 00:00:00 2001 From: Alireza Miryazdi Date: Tue, 30 Aug 2022 21:11:22 +0000 Subject: [PATCH] examples/webrtc: add some missing unrefs Part-of: --- .../webrtc/multiparty-sendrecv/gst/mp-webrtc-sendrecv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst/mp-webrtc-sendrecv.c b/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst/mp-webrtc-sendrecv.c index 5047510151..80e8c0ed19 100644 --- a/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst/mp-webrtc-sendrecv.c +++ b/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst/mp-webrtc-sendrecv.c @@ -282,6 +282,7 @@ on_offer_created (GstPromise * promise, const gchar * peer_id) /* Send offer to peer */ send_room_peer_sdp (offer, peer_id); gst_webrtc_session_description_free (offer); + gst_object_unref (webrtc); } static void @@ -388,6 +389,9 @@ add_peer_to_pipeline (const gchar * peer_id, gboolean offer) g_assert_true (ret); ret = gst_element_sync_state_with_parent (webrtc); g_assert_true (ret); + + gst_object_unref (q); + gst_object_unref (webrtc) } static void @@ -606,6 +610,7 @@ on_answer_created (GstPromise * promise, const gchar * peer_id) /* Send offer to peer */ send_room_peer_sdp (answer, peer_id); gst_webrtc_session_description_free (answer); + gst_object_unref (webrtc); app_state = ROOM_CALL_STARTED; }