gst/effectv/gstquark.c: Memory free'ing location fix (#164708).

Original commit message from CVS:
Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
* gst/effectv/gstquark.c: (gst_quarktv_class_init),
(gst_quarktv_change_state), (gst_quarktv_dispose):
Memory free'ing location fix (#164708).
This commit is contained in:
Ronald S. Bultje 2005-01-25 12:17:15 +00:00
parent 936a11849b
commit 3a3a26e7f0
2 changed files with 27 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2005-01-25 Edward Hervey <bilboed@bilboed.com>
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/effectv/gstquark.c: (gst_quarktv_class_init),
(gst_quarktv_change_state), (gst_quarktv_dispose):
Memory free'ing location fix (#164708).
2005-01-25 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/playback/gstplaybasebin.c: (group_commit),

View file

@ -94,6 +94,7 @@ static void gst_quarktv_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_quarktv_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static void gst_quarktv_dispose (GObject * object);
static void gst_quarktv_chain (GstPad * pad, GstData * _data);
@ -164,6 +165,7 @@ gst_quarktv_class_init (GstQuarkTVClass * klass)
gobject_class->set_property = gst_quarktv_set_property;
gobject_class->get_property = gst_quarktv_get_property;
gobject_class->dispose = gst_quarktv_dispose;
gstelement_class->change_state = gst_quarktv_change_state;
}
@ -287,8 +289,6 @@ gst_quarktv_change_state (GstElement * element)
gst_buffer_unref (filter->planetable[i]);
filter->planetable[i] = NULL;
}
g_free (filter->planetable);
filter->planetable = NULL;
break;
}
default:
@ -362,3 +362,20 @@ gst_quarktv_get_property (GObject * object, guint prop_id, GValue * value,
break;
}
}
static void
gst_quarktv_dispose (GObject * object)
{
GstQuarkTV *filter = GST_QUARKTV (object);
gint i;
for (i = 0; i < filter->planes; i++) {
if (filter->planetable[i])
gst_buffer_unref (filter->planetable[i]);
filter->planetable[i] = NULL;
}
g_free (filter->planetable);
filter->planetable = NULL;
G_OBJECT_CLASS (parent_class)->dispose (object);
}