Fix memory leaks.

Original commit message from CVS:
* ext/flac/gstflactag.c: (gst_flac_tag_init):
* gst/interleave/deinterleave.c: (deinterleave_init),
(deinterleave_sink_link):
* gst/interleave/interleave.c: (interleave_init):
* gst/median/gstmedian.c: (gst_median_init):
* gst/oldcore/gstmultifilesrc.c: (gst_multifilesrc_init):
Fix memory leaks.
* tests/check/elements/id3demux.c: (pad_added_cb):
Remove unused variable.
This commit is contained in:
Edward Hervey 2007-06-22 10:12:15 +00:00
parent f6933c8d2f
commit 8b1eeb5a6a
5 changed files with 17 additions and 13 deletions

View file

@ -1,3 +1,15 @@
2007-06-22 Edward Hervey <edward@fluendo.com>
* ext/flac/gstflactag.c: (gst_flac_tag_init):
* gst/interleave/deinterleave.c: (deinterleave_init),
(deinterleave_sink_link):
* gst/interleave/interleave.c: (interleave_init):
* gst/median/gstmedian.c: (gst_median_init):
* gst/oldcore/gstmultifilesrc.c: (gst_multifilesrc_init):
Fix memory leaks.
* tests/check/elements/id3demux.c: (pad_added_cb):
Remove unused variable.
2007-06-21 Jan Schmidt <thaytan@mad.scientist.com>
* ext/gconf/gconf.h:

View file

@ -243,15 +243,13 @@ gst_flac_tag_init (GstFlacTag * tag)
{
/* create the sink and src pads */
tag->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&flac_tag_sink_template), "sink");
gst_pad_new_from_static_template (&flac_tag_sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (tag), tag->sinkpad);
gst_pad_set_chain_function (tag->sinkpad,
GST_DEBUG_FUNCPTR (gst_flac_tag_chain));
tag->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&flac_tag_src_template), "src");
gst_pad_new_from_static_template (&flac_tag_src_template, "src");
gst_element_add_pad (GST_ELEMENT (tag), tag->srcpad);
tag->buffer = NULL;

View file

@ -162,16 +162,13 @@ void
gst_median_init (GstMedian * median)
{
median->sinkpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&median_sink_factory), "sink");
gst_pad_new_from_static_template (&media_sink_factory, "sink");
gst_pad_set_getcaps_function (median->sinkpad, gst_pad_proxy_getcaps);
gst_pad_set_link_function (median->sinkpad, gst_median_link);
gst_pad_set_chain_function (median->sinkpad, gst_median_chain);
gst_element_add_pad (GST_ELEMENT (median), median->sinkpad);
median->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get
(&median_src_factory), "src");
median->srcpad = gst_pad_new_from_static_template (&media_src_factory, "src");
gst_pad_set_getcaps_function (median->srcpad, gst_pad_proxy_getcaps);
gst_pad_set_link_function (median->sinkpad, gst_median_link);
gst_element_add_pad (GST_ELEMENT (median), median->srcpad);

View file

@ -130,9 +130,7 @@ gst_multifilesrc_init (GstMultiFileSrc * multifilesrc,
{
/* GST_OBJECT_FLAG_SET (filesrc, GST_SRC_); */
multifilesrc->srcpad =
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
"src");
multifilesrc->srcpad = gst_pad_new_from_static_template (&srctemplate, "src");
gst_pad_set_get_function (multifilesrc->srcpad, gst_multifilesrc_get);
/* gst_pad_set_getregion_function (multifilesrc->srcpad,gst_multifilesrc_get_region); */
gst_element_add_pad (GST_ELEMENT (multifilesrc), multifilesrc->srcpad);

View file

@ -28,7 +28,6 @@ static void
pad_added_cb (GstElement * id3demux, GstPad * pad, GstBin * pipeline)
{
GstElement *sink;
GstPad *sinkpad;
sink = gst_bin_get_by_name (pipeline, "fakesink");
fail_unless (gst_element_link (id3demux, sink));