From cba47ec36158643ca7327955aaab5bf47561e689 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 2 May 2006 18:50:23 +0000 Subject: gst/: don't leak caps-string Original commit message from CVS: * gst/alpha/gstalphacolor.c: (gst_alpha_color_transform_caps): * gst/debug/negotiation.c: (gst_negotiation_update_caps): * gst/rtp/gstrtpilbcdepay.c: (gst_rtp_ilbc_depay_setcaps): don't leak caps-string --- gst/rtp/gstrtpilbcdepay.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gst/rtp/gstrtpilbcdepay.c') diff --git a/gst/rtp/gstrtpilbcdepay.c b/gst/rtp/gstrtpilbcdepay.c index d08c5b39..1d3448d4 100644 --- a/gst/rtp/gstrtpilbcdepay.c +++ b/gst/rtp/gstrtpilbcdepay.c @@ -148,6 +148,7 @@ gst_rtp_ilbc_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) GstRTPiLBCDepay *rtpilbcdepay = GST_RTP_ILBC_DEPAY (depayload); GstCaps *srccaps; GstStructure *structure; + gchar *str; gboolean ret; srccaps = gst_caps_copy (gst_static_pad_template_get_caps @@ -156,7 +157,10 @@ gst_rtp_ilbc_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_structure_set (structure, "mode", G_TYPE_INT, rtpilbcdepay->mode == GST_ILBC_MODE_30 ? 30 : 20, NULL); ret = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps); - GST_DEBUG ("caps set on source are %s", gst_caps_to_string (srccaps)); + + str = gst_caps_to_string (srccaps) + GST_DEBUG ("caps set on source are %s", str); + g_free (str); gst_caps_unref (srccaps); return ret; -- cgit