mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-05 05:52:37 +00:00
plugins/elements/gstfakesrc.c: Fix leaks in fakesrc.
Original commit message from CVS: * plugins/elements/gstfakesrc.c: (gst_fake_src_class_init), (gst_fake_src_finalize): Fix leaks in fakesrc. * tests/check/pipelines/parse-launch.c: (GST_START_TEST): Fix leaks in the testcase.
This commit is contained in:
parent
93ff4560cc
commit
b7edbd2caf
3 changed files with 30 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
2006-03-20 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* plugins/elements/gstfakesrc.c: (gst_fake_src_class_init),
|
||||
(gst_fake_src_finalize):
|
||||
Fix leaks in fakesrc.
|
||||
|
||||
* tests/check/pipelines/parse-launch.c: (GST_START_TEST):
|
||||
Fix leaks in the testcase.
|
||||
|
||||
2006-03-19 Sebastien Moutte <sebastien@moutte.net>
|
||||
|
||||
* gst/gst_private.h:
|
||||
|
|
|
@ -215,6 +215,7 @@ gst_fake_src_filltype_get_type (void)
|
|||
GST_BOILERPLATE_FULL (GstFakeSrc, gst_fake_src, GstBaseSrc, GST_TYPE_BASE_SRC,
|
||||
_do_init);
|
||||
|
||||
static void gst_fake_src_finalize (GObject * object);
|
||||
static void gst_fake_src_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
static void gst_fake_src_get_property (GObject * object, guint prop_id,
|
||||
|
@ -254,6 +255,8 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
|
|||
gstelement_class = (GstElementClass *) klass;
|
||||
gstbase_src_class = (GstBaseSrcClass *) klass;
|
||||
|
||||
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_fake_src_finalize);
|
||||
|
||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_fake_src_set_property);
|
||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_fake_src_get_property);
|
||||
|
||||
|
@ -367,6 +370,22 @@ gst_fake_src_init (GstFakeSrc * fakesrc, GstFakeSrcClass * g_class)
|
|||
fakesrc->sync = DEFAULT_SYNC;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_fake_src_finalize (GObject * object)
|
||||
{
|
||||
GstFakeSrc *src;
|
||||
|
||||
src = GST_FAKE_SRC (object);
|
||||
|
||||
g_free (src->last_message);
|
||||
if (src->parent) {
|
||||
gst_buffer_unref (src->parent);
|
||||
src->parent = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_fake_src_event_handler (GstBaseSrc * basesrc, GstEvent * event)
|
||||
{
|
||||
|
|
|
@ -143,6 +143,7 @@ GST_START_TEST (test_launch_lines2)
|
|||
fail_unless (strcmp (s, "donald") == 0, "fakesrc name was not 'donald'");
|
||||
fail_unless (i == 27, "num-buffers was not 27");
|
||||
fail_unless (b == TRUE, "silent was not TRUE");
|
||||
g_free (s);
|
||||
|
||||
g_object_get (G_OBJECT (cur), "sizetype", &i, NULL);
|
||||
fail_unless (i == 3, "sizetype != 3");
|
||||
|
@ -190,6 +191,7 @@ GST_START_TEST (test_launch_lines2)
|
|||
g_object_get (G_OBJECT (cur), "name", &s, NULL);
|
||||
fail_if (s == NULL, "name was NULL");
|
||||
fail_unless (strcmp (s, "john") == 0, "Name was not 'john'");
|
||||
g_free (s);
|
||||
check_pipeline_runs (cur);
|
||||
gst_object_unref (cur);
|
||||
|
||||
|
|
Loading…
Reference in a new issue