gst/: don't leak caps-string
authorStefan Kost <ensonic@users.sourceforge.net>
Tue, 2 May 2006 18:50:23 +0000 (18:50 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Tue, 2 May 2006 18:50:23 +0000 (18:50 +0000)
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

ChangeLog
gst/alpha/gstalphacolor.c
gst/debug/negotiation.c
gst/rtp/gstrtpilbcdepay.c

index a706b7bba33a0f5675830223ded92f5e2e352558..b26022571c83ba099dd25dc69707ed7b8c052d4e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-02  Stefan Kost  <ensonic@users.sf.net>
+
+       * 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
+
 2006-05-02  Tim-Philipp Müller  <tim at centricular dot net>
 
        * gst/id3demux/gstid3demux.c: (gst_id3demux_chain),
index 46e76c7752d03bd96ef39dde8065ea9819a9559e..f7f8fc55998c0d539661dd27e0ba1fa2e561632f 100644 (file)
@@ -180,8 +180,15 @@ gst_alpha_color_transform_caps (GstBaseTransform * btrans,
   gst_caps_unref (local_caps);
   gst_caps_do_simplify (result);
 
-  GST_LOG ("transformed %s to %s", gst_caps_to_string (caps),
-      gst_caps_to_string (result));
+  {
+    gchar *caps_str, *result_str;
+
+    caps_str = gst_caps_to_string (caps);
+    result_str = gst_caps_to_string (result);
+    GST_LOG ("transformed %s to %s", caps_str, result_str);
+    g_free (caps_str);
+    g_free (result_str);
+  }
 
   return result;
 }
index e28b2cf5e0534f70eba801dbd66c8a9d27b97567..21357da3ed293049d274cc8c899e87cad2fadd0d 100644 (file)
@@ -237,6 +237,7 @@ gst_negotiation_update_caps (GstNegotiation * negotiation)
   GstCaps *srccaps;
   GstCaps *sinkcaps;
   GstCaps *icaps;
+  gchar *icapsstr;
 
   srccaps = gst_pad_get_allowed_caps (negotiation->srcpad);
   sinkcaps = gst_pad_get_allowed_caps (negotiation->sinkpad);
@@ -247,7 +248,9 @@ gst_negotiation_update_caps (GstNegotiation * negotiation)
 
   gst_caps_replace (&negotiation->caps, icaps);
   g_object_notify (G_OBJECT (negotiation), "allowed-caps");
-  g_print ("notify %s", gst_caps_to_string (icaps));
+  icapsstr = gst_caps_to_string (icaps);
+  GST_DEBUG ("notify %s", icapsstr);
+  g_free (icapsstr);
 }
 
 static void
index d08c5b392c282750708d058d9643984f2955aa6a..1d3448d46d81c33acbc46cbbcc3863963a9dc3d5 100644 (file)
@@ -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;