rsvgdec: avoid reffing the element in chain
authorStefan Kost <ensonic@users.sf.net>
Mon, 8 Nov 2010 14:00:21 +0000 (16:00 +0200)
committerStefan Kost <ensonic@users.sf.net>
Mon, 8 Nov 2010 14:02:07 +0000 (16:02 +0200)
ext/rsvg/gstrsvgdec.c

index 032ea54..b885d15 100644 (file)
@@ -323,7 +323,7 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, const guint8 * data, guint size,
 static GstFlowReturn
 gst_rsvg_dec_chain (GstPad * pad, GstBuffer * buffer)
 {
-  GstRsvgDec *rsvg = GST_RSVG_DEC (gst_pad_get_parent (pad));
+  GstRsvgDec *rsvg = GST_RSVG_DEC (GST_PAD_PARENT (pad));
   gboolean completed = FALSE;
   const guint8 *data;
   guint size;
@@ -411,8 +411,6 @@ gst_rsvg_dec_chain (GstPad * pad, GstBuffer * buffer)
     }
   }
 
-  gst_object_unref (rsvg);
-
   return GST_FLOW_OK;
 }