gst/videoscale/: leak fixes
authorChristophe Fergeau <teuf@gnome.org>
Wed, 3 Nov 2004 16:08:14 +0000 (16:08 +0000)
committerChristophe Fergeau <teuf@gnome.org>
Wed, 3 Nov 2004 16:08:14 +0000 (16:08 +0000)
Original commit message from CVS:
2004-11-03  Christophe Fergeau  <teuf@gnome.org>

* gst/videoscale/gstvideoscale.c: (gst_videoscale_getcaps):
* gst/videoscale/videoscale.c: (videoscale_find_by_structure):
leak fixes

ChangeLog
gst/videoscale/gstvideoscale.c
gst/videoscale/videoscale.c

index 0459ad1..6553f4e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-03  Christophe Fergeau  <teuf@gnome.org>
+
+       * gst/videoscale/gstvideoscale.c: (gst_videoscale_getcaps):
+       * gst/videoscale/videoscale.c: (videoscale_find_by_structure):
+       leak fixes
+
 2004-11-03  Wim Taymans  <wim@fluendo.com>
 
        * gst/ffmpegcolorspace/gstffmpegcodecmap.c:
index 403711d..febb5cc 100644 (file)
@@ -177,7 +177,6 @@ static GstCaps *
 gst_videoscale_getcaps (GstPad * pad)
 {
   GstVideoscale *videoscale;
-  GstCaps *othercaps;
   GstCaps *caps;
   GstPad *otherpad;
   int i;
@@ -186,12 +185,11 @@ gst_videoscale_getcaps (GstPad * pad)
 
   otherpad = (pad == videoscale->srcpad) ? videoscale->sinkpad :
       videoscale->srcpad;
-  othercaps = gst_pad_get_allowed_caps (otherpad);
+  caps = gst_pad_get_allowed_caps (otherpad);
 
   GST_DEBUG_OBJECT (pad, "othercaps of otherpad %s:%s are: %" GST_PTR_FORMAT,
-      GST_DEBUG_PAD_NAME (otherpad), othercaps);
+      GST_DEBUG_PAD_NAME (otherpad), caps);
 
-  caps = gst_caps_copy (othercaps);
   for (i = 0; i < gst_caps_get_size (caps); i++) {
     GstStructure *structure = gst_caps_get_structure (caps, i);
 
index f85e463..7e6decf 100644 (file)
@@ -164,8 +164,11 @@ videoscale_find_by_structure (GstStructure * structure)
   int i;
   gboolean ret;
   struct videoscale_format_struct *format;
+  char *str;
 
-  GST_DEBUG ("finding %s", gst_structure_to_string (structure));
+  str = gst_structure_to_string (structure);
+  GST_DEBUG ("finding %s", str);
+  g_free (str);
 
   g_return_val_if_fail (structure != NULL, NULL);