mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-08 00:59:48 +00:00
Fixed long standing mem-leak
Original commit message from CVS: * gst/gstelement.c: (gst_element_class_init), (gst_element_set_state), (activate_pads), (gst_element_save_thyself): * tools/gst-compprep.c: (main): * tools/gst-inspect.c: (print_element_properties_info): * tools/gst-xmlinspect.c: (print_element_properties): Fixed long standing mem-leak
This commit is contained in:
parent
59a41141ca
commit
a7d4464ac1
5 changed files with 29 additions and 16 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2005-08-24 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* gst/gstelement.c: (gst_element_class_init),
|
||||
(gst_element_set_state), (activate_pads),
|
||||
(gst_element_save_thyself):
|
||||
* tools/gst-compprep.c: (main):
|
||||
* tools/gst-inspect.c: (print_element_properties_info):
|
||||
* tools/gst-xmlinspect.c: (print_element_properties):
|
||||
Fixed long standing mem-leak
|
||||
|
||||
2005-08-24 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* check/gst/gstbin.c: (GST_START_TEST):
|
||||
|
|
|
@ -116,8 +116,8 @@ gst_element_class_init (GstElementClass * klass)
|
|||
/**
|
||||
* GstElement::state-changed:
|
||||
* @gstelement: the object which received the signal
|
||||
* @old_state: the GST_STATE_XXX before the change
|
||||
* @new_state: the GST_STATE_XXX after the change
|
||||
* @int:
|
||||
* @int:
|
||||
*
|
||||
* the #GstElementState of the element has been changed
|
||||
*/
|
||||
|
@ -128,7 +128,7 @@ gst_element_class_init (GstElementClass * klass)
|
|||
/**
|
||||
* GstElement::pad-added:
|
||||
* @gstelement: the object which received the signal
|
||||
* @new_pad: the pad that has been added
|
||||
* @object:
|
||||
*
|
||||
* a new #GstPad has been added to the element
|
||||
*/
|
||||
|
@ -139,7 +139,7 @@ gst_element_class_init (GstElementClass * klass)
|
|||
/**
|
||||
* GstElement::pad-removed:
|
||||
* @gstelement: the object which received the signal
|
||||
* @old_pad: the pad that has been removed
|
||||
* @object:
|
||||
*
|
||||
* a #GstPad has been removed from the element
|
||||
*/
|
||||
|
@ -151,7 +151,7 @@ gst_element_class_init (GstElementClass * klass)
|
|||
* GstElement::no-more-pads:
|
||||
* @gstelement: the object which received the signal
|
||||
*
|
||||
* This signals that the element will not generate more dynamic pads.
|
||||
* ?
|
||||
*/
|
||||
gst_element_signals[NO_MORE_PADS] =
|
||||
g_signal_new ("no-more-pads", G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -1140,13 +1140,10 @@ gst_element_send_event (GstElement * element, GstEvent * event)
|
|||
/**
|
||||
* gst_element_seek:
|
||||
* @element: a #GstElement to send the event to.
|
||||
* @rate: the rate of the seek
|
||||
* @format: the #GstFormat to use for seeking (GST_FORMAT_*).
|
||||
* @flags: the flags to use for seeking (GST_SEEK_FLAG_*).
|
||||
* @cur_type: the #GstSeekType for the start offset
|
||||
* @cur: the start offset to seek to (in the given seek_format).
|
||||
* @stop_type: the #GstSeekType for the end offset
|
||||
* @stop: the end offset to seek to (in the given seek_format).
|
||||
* @seek_method: the method to use for seeking (GST_SEEK_METHOD_*).
|
||||
* @seek_format: the #GstFormat to use for seeking (GST_FORMAT_*).
|
||||
* @seek_flags: the flags to use for seeking (GST_SEEK_FLAG_*).
|
||||
* @offset: the offset to seek to (in the given seek_format).
|
||||
*
|
||||
* Sends a seek event to an element.
|
||||
*
|
||||
|
@ -1768,7 +1765,6 @@ gst_element_set_state (GstElement * element, GstElementState state)
|
|||
GstElementState pending;
|
||||
GTimeVal tv;
|
||||
|
||||
g_return_val_if_fail (GST_IS_ELEMENT (element), GST_STATE_FAILURE);
|
||||
|
||||
/* get current element state, need to call the method so that
|
||||
* we call the virtual method and subclasses can implement their
|
||||
|
@ -1782,7 +1778,6 @@ gst_element_set_state (GstElement * element, GstElementState state)
|
|||
GST_STATE_FINAL (element) = state;
|
||||
if (ret == GST_STATE_ASYNC) {
|
||||
gst_element_commit_state (element);
|
||||
gst_element_lost_state (element);
|
||||
}
|
||||
|
||||
/* start with the current state */
|
||||
|
@ -1892,8 +1887,6 @@ activate_pads (GstPad * pad, GValue * ret, gboolean * active)
|
|||
{
|
||||
if (!gst_pad_set_active (pad, *active))
|
||||
g_value_set_boolean (ret, FALSE);
|
||||
else if (!*active)
|
||||
gst_pad_set_caps (pad, NULL);
|
||||
|
||||
gst_object_unref (pad);
|
||||
return TRUE;
|
||||
|
@ -2127,6 +2120,10 @@ gst_element_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
(xmlChar *) GST_PLUGIN_FEATURE (factory)->name);
|
||||
}
|
||||
|
||||
/* FIXME: what is this? */
|
||||
/* if (element->manager) */
|
||||
/* xmlNewChild(parent, NULL, "manager", GST_ELEMENT_NAME(element->manager)); */
|
||||
|
||||
/* params */
|
||||
specs = g_object_class_list_properties (G_OBJECT_GET_CLASS (object), &nspecs);
|
||||
|
||||
|
@ -2159,6 +2156,8 @@ gst_element_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
}
|
||||
}
|
||||
|
||||
g_free (specs);
|
||||
|
||||
pads = GST_ELEMENT_PADS (element);
|
||||
|
||||
while (pads) {
|
||||
|
|
|
@ -133,6 +133,7 @@ main (int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
}
|
||||
g_free (property_specs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -489,6 +489,8 @@ print_element_properties_info (GstElement * element)
|
|||
}
|
||||
if (num_properties == 0)
|
||||
n_print (" none\n");
|
||||
|
||||
g_free (property_specs);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -353,6 +353,7 @@ print_element_properties (GstElement * element, gint pfx)
|
|||
PUT_END_TAG (pfx + 1, "element-property");
|
||||
}
|
||||
PUT_END_TAG (pfx, "element-properties");
|
||||
g_free (property_specs);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue