+2007-08-17 Stefan Kost <ensonic@users.sf.net>
+
+ * ext/amrnb/amrnbdec.c:
+ * ext/amrnb/amrnbenc.c:
+ * ext/amrnb/amrnbparse.c:
+ * ext/sidplay/gstsiddec.cc:
+ Fix more leaks.
+
2007-08-16 Wim Taymans <wim.taymans@gmail.com>
Patch by: Daniel Charles <dcharles at ti dot com>
ret = gst_pad_push_event (amrnbdec->srcpad, event);
}
break;
- break;
default:
ret = gst_pad_push_event (amrnbdec->srcpad, event);
break;
static GstStateChangeReturn gst_amrnbparse_state_change (GstElement * element,
GstStateChange transition);
+static void gst_amrnbparse_finalize (GObject * object);
+
#define _do_init(bla) \
GST_DEBUG_CATEGORY_INIT (gst_amrnbparse_debug, "amrnbparse", 0, "AMR-NB audio stream parser");
static void
gst_amrnbparse_class_init (GstAmrnbParseClass * klass)
{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+ object_class->finalize = gst_amrnbparse_finalize;
+
element_class->change_state = GST_DEBUG_FUNCPTR (gst_amrnbparse_state_change);
}
amrnbparse->ts = 0;
}
+static void
+gst_amrnbparse_finalize (GObject * object)
+{
+ GstAmrnbParse *amrnbparse;
+
+ amrnbparse = GST_AMRNBPARSE (object);
+
+ gst_adapter_clear (amrnbparse->adapter);
+ g_object_unref (amrnbparse->adapter);
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+
/*
* Position querying.
*/
static void
gst_siddec_init (GstSidDec * siddec)
{
- siddec->sinkpad =
- gst_pad_new_from_template (gst_static_pad_template_get (&sink_templ),
- "sink");
+ siddec->sinkpad = gst_pad_new_from_static_template (&sink_templ, "sink");
gst_pad_set_query_function (siddec->sinkpad, NULL);
gst_pad_set_event_function (siddec->sinkpad, gst_siddec_sink_event);
gst_pad_set_chain_function (siddec->sinkpad, gst_siddec_chain);
gst_element_add_pad (GST_ELEMENT (siddec), siddec->sinkpad);
- siddec->srcpad =
- gst_pad_new_from_template (gst_static_pad_template_get (&src_templ),
- "src");
+ siddec->srcpad = gst_pad_new_from_static_template (&src_templ, "src");
gst_pad_set_event_function (siddec->srcpad, gst_siddec_src_event);
gst_pad_set_query_function (siddec->srcpad, gst_siddec_src_query);
gst_pad_use_fixed_caps (siddec->srcpad);