sys/oss/gstosssink.c: Free the device name string when finalised.

Original commit message from CVS:
* sys/oss/gstosssink.c: (gst_oss_sink_class_init),
(gst_oss_sink_init), (gst_oss_sink_finalise):
Free the device name string when finalised.
This commit is contained in:
Jan Schmidt 2006-01-27 01:43:07 +00:00
parent 7814b56eee
commit 6b789d2dd1
2 changed files with 18 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2006-01-27 Jan Schmidt <thaytan@mad.scientist.com>
* sys/oss/gstosssink.c: (gst_oss_sink_class_init),
(gst_oss_sink_init), (gst_oss_sink_finalise):
Free the device name string when finalised.
2006-01-25 Tim-Philipp Müller <tim at centricular dot net>
* gst/id3demux/gstid3demux.c: (gst_id3demux_remove_srcpad):

View file

@ -59,7 +59,9 @@ GST_ELEMENT_DETAILS ("Audio Sink (OSS)",
static void gst_oss_sink_base_init (gpointer g_class);
static void gst_oss_sink_class_init (GstOssSinkClass * klass);
static void gst_oss_sink_init (GstOssSink * osssink);
static void gst_oss_sink_dispose (GObject * object);
static void gst_oss_sink_finalise (GObject * object);
static void gst_oss_sink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
@ -179,6 +181,7 @@ gst_oss_sink_class_init (GstOssSinkClass * klass)
parent_class = g_type_class_ref (GST_TYPE_BASE_AUDIO_SINK);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_oss_sink_dispose);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_oss_sink_finalise);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_oss_sink_get_property);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_oss_sink_set_property);
@ -202,10 +205,18 @@ gst_oss_sink_init (GstOssSink * osssink)
{
GST_DEBUG ("initializing osssink");
osssink->device = g_strdup (DEFAULT_DEVICE);;
osssink->device = g_strdup (DEFAULT_DEVICE);
osssink->fd = -1;
}
static void
gst_oss_sink_finalise (GObject * object)
{
GstOssSink *osssink = GST_OSSSINK (object);
g_free (osssink->device);
}
static void
gst_oss_sink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)