+2006-01-25 Edgard Lima <edgard.lima@indt.org.br>
+
+ * ext/libmms/gstmms.c: (gst_mms_finalize), (gst_mms_set_property),
+ (gst_mms_get_property), (gst_mms_src_query), (gst_mms_class_init):
+ Finalize method has been created and others small changes.
+
2006-01-24 Tim-Philipp Müller <tim at centricular dot net>
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_base_init),
static void gst_mms_class_init (GstMMSClass * klass);
static void gst_mms_base_init (gpointer g_class);
static void gst_mms_init (GstMMS * mmssrc, GstMMSClass * g_class);
+static void gst_mms_finalize (GObject * gobject);
static void gst_mms_uri_handler_init (gpointer g_iface, gpointer iface_data);
gobject_class->set_property = gst_mms_set_property;
gobject_class->get_property = gst_mms_get_property;
+ gobject_class->finalize = gst_mms_finalize;
g_object_class_install_property (gobject_class, ARG_LOCATION,
g_param_spec_string ("location", "location",
mmssrc->blocksize = 2048;
}
+static void
+gst_mms_finalize (GObject * gobject)
+{
+ GstMMS *mmssrc = GST_MMS (gobject);
+
+ gst_mms_stop (mmssrc);
+
+ if (mmssrc->uri_name) {
+ g_free (mmssrc->uri_name);
+ mmssrc->uri_name = NULL;
+ }
+
+}
+
/*
* location querying and so on.
*/
gint64 query_res;
GstQuery *query;
- *buf = NULL;
mmssrc = GST_MMS (psrc);
*buf = gst_buffer_new_and_alloc (mmssrc->blocksize);
switch (prop_id) {
case ARG_LOCATION:
+ if (mmssrc->uri_name) {
+ g_free (mmssrc->uri_name);
+ mmssrc->uri_name = NULL;
+ }
mmssrc->uri_name = g_value_dup_string (value);
break;
case ARG_BLOCKSIZE:
switch (prop_id) {
case ARG_LOCATION:
- g_value_set_string (value, mmssrc->uri_name);
+ if (mmssrc->uri_name)
+ g_value_set_string (value, mmssrc->uri_name);
break;
case ARG_BLOCKSIZE:
g_value_set_int (value, mmssrc->blocksize);