From 7466444b63fb129b543ca0251691bcf16775ec94 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 29 Apr 2022 23:33:47 +0300 Subject: [PATCH] rtpjitterbuffer: Free CNAME/SSRC mappings on finalize and PAUSED->READY Part-of: --- subprojects/gst-plugins-good/gst/rtpmanager/gstrtpjitterbuffer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpjitterbuffer.c b/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpjitterbuffer.c index 38c2780..1959e1f 100644 --- a/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpjitterbuffer.c @@ -1226,6 +1226,9 @@ gst_rtp_jitter_buffer_finalize (GObject * object) g_cond_clear (&priv->jbuf_query); rtp_jitter_buffer_flush (priv->jbuf, NULL, NULL); + g_list_free_full (priv->cname_ssrc_mappings, + (GDestroyNotify) cname_ssrc_mapping_free); + priv->cname_ssrc_mappings = NULL; g_queue_foreach (&priv->gap_packets, (GFunc) gst_buffer_unref, NULL); g_queue_clear (&priv->gap_packets); g_object_unref (priv->jbuf); @@ -1882,6 +1885,9 @@ gst_rtp_jitter_buffer_change_state (GstElement * element, g_thread_join (priv->timer_thread); priv->timer_thread = NULL; gst_clear_caps (&priv->reference_timestamp_caps); + g_list_free_full (priv->cname_ssrc_mappings, + (GDestroyNotify) cname_ssrc_mapping_free); + priv->cname_ssrc_mappings = NULL; break; case GST_STATE_CHANGE_READY_TO_NULL: break; -- 2.7.4