examples: webrtc: mp-sendrecv: set element states to NULL after removing them from pipeline

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3219>
This commit is contained in:
Sam Van Den Berge 2022-10-18 15:27:20 +02:00 committed by GStreamer Marge Bot
parent 17c111d2b9
commit 93ed51cbb2

View file

@ -308,6 +308,7 @@ remove_peer_from_pipeline (const gchar * peer_id)
return;
gst_bin_remove (GST_BIN (pipeline), webrtc);
gst_element_set_state (GST_ELEMENT (webrtc), GST_STATE_NULL);
gst_object_unref (webrtc);
qname = g_strdup_printf ("queue-%s", peer_id);
@ -321,6 +322,7 @@ remove_peer_from_pipeline (const gchar * peer_id)
gst_object_unref (sinkpad);
gst_bin_remove (GST_BIN (pipeline), q);
gst_element_set_state (GST_ELEMENT (q), GST_STATE_NULL);
gst_object_unref (q);
tee = gst_bin_get_by_name (GST_BIN (pipeline), "audiotee");