[0.11] gst-plugins-bad: rsvgoverlay: fix adapter leak

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Jan 25 04:23:56 PST 2012


Module: gst-plugins-bad
Branch: 0.11
Commit: 08bce008b0a38d5994f926f2a1e61be4541e444d
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08bce008b0a38d5994f926f2a1e61be4541e444d

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Fri Jan 13 10:25:22 2012 +0000

rsvgoverlay: fix adapter leak

---

 ext/rsvg/gstrsvgoverlay.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/ext/rsvg/gstrsvgoverlay.c b/ext/rsvg/gstrsvgoverlay.c
index 121d4d2..42de199 100644
--- a/ext/rsvg/gstrsvgoverlay.c
+++ b/ext/rsvg/gstrsvgoverlay.c
@@ -123,6 +123,8 @@ static GstStaticPadTemplate data_sink_template =
 GST_BOILERPLATE (GstRsvgOverlay, gst_rsvg_overlay, GstVideoFilter,
     GST_TYPE_VIDEO_FILTER);
 
+static void gst_rsvg_overlay_finalize (GObject * object);
+
 static void
 gst_rsvg_overlay_set_svg_data (GstRsvgOverlay * overlay, const gchar * data,
     gboolean consider_as_filename)
@@ -466,6 +468,7 @@ gst_rsvg_overlay_class_init (GstRsvgOverlayClass * klass)
 
   gobject_class->set_property = gst_rsvg_overlay_set_property;
   gobject_class->get_property = gst_rsvg_overlay_get_property;
+  gobject_class->finalize = gst_rsvg_overlay_finalize;
 
   g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DATA,
       g_param_spec_string ("data", "data", "SVG data.", "",
@@ -541,3 +544,13 @@ gst_rsvg_overlay_init (GstRsvgOverlay * overlay, GstRsvgOverlayClass * klass)
       GST_DEBUG_FUNCPTR (gst_rsvg_overlay_data_sink_event));
   gst_element_add_pad (GST_ELEMENT (overlay), overlay->data_sinkpad);
 }
+
+static void
+gst_rsvg_overlay_finalize (GObject * object)
+{
+  GstRsvgOverlay *overlay = GST_RSVG_OVERLAY (object);
+
+  g_object_unref (overlay->adapter);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}



More information about the gstreamer-commits mailing list