From 0fcc94b64e15856b823fbcad1275b7cc29678b6a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 17 Apr 2008 07:31:44 +0000 Subject: gst/rtpmanager/: Unset GValues after g_signal_emitv so that we avoid a refcount leak. Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (get_pt_map), (free_client), (gst_rtp_bin_associate), (gst_rtp_bin_get_free_pad_name): * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_get_clock_rate): * gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_get_caps): * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_clock_rate): Unset GValues after g_signal_emitv so that we avoid a refcount leak. Don't leak a padname. Don't leak client streams list. Lock rtpbin when associating streams. Fixes #528245. --- gst/rtpmanager/gstrtpsession.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gst/rtpmanager/gstrtpsession.c') diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 3f7053d7..a73de15b 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -1244,7 +1244,10 @@ gst_rtp_session_clock_rate (RTPSession * sess, guint8 payload, g_signal_emitv (args, gst_rtp_session_signals[SIGNAL_REQUEST_PT_MAP], 0, &ret); - caps = (GstCaps *) g_value_get_boxed (&ret); + g_value_unset (&args[0]); + g_value_unset (&args[1]); + caps = (GstCaps *) g_value_dup_boxed (&ret); + g_value_unset (&ret); if (!caps) goto no_caps; -- cgit v1.2.1