static GstCaps *gst_interlace_getcaps (GstPad * pad);
static GstStateChangeReturn gst_interlace_change_state (GstElement * element,
GstStateChange transition);
+static void gst_interlace_finalize (GObject * obj);
static GstElementClass *parent_class = NULL;
object_class->set_property = gst_interlace_set_property;
object_class->get_property = gst_interlace_get_property;
+ object_class->finalize = gst_interlace_finalize;
element_class->change_state = gst_interlace_change_state;
}
+static void
+gst_interlace_finalize (GObject * obj)
+{
+ GstInterlace *interlace = GST_INTERLACE (obj);
+
+ gst_caps_replace (&interlace->srccaps, NULL);
+
+ G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
static void
gst_interlace_reset (GstInterlace * interlace)
{
gboolean interlaced = TRUE;
int fps_n, fps_d;
GstPad *otherpad;
- GstCaps *othercaps;
+ GstCaps *othercaps = NULL;
const PulldownFormat *pdformat;
interlace = GST_INTERLACE (gst_pad_get_parent (pad));
}
error:
+ if (othercaps)
+ gst_caps_unref (othercaps);
g_object_unref (interlace);
return ret;