summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-06-03 09:04:49 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-06-03 09:04:49 +0000
commit2ab07d030f65bb8c1c2c4681678fc49f8e7a46e0 (patch)
tree8da3ad47167b992a5b80ac287548cbedb19a366e
parent8a60548de4b217dd666ad99f2307cbc741fe4433 (diff)
downloadgst-plugins-bad-2ab07d030f65bb8c1c2c4681678fc49f8e7a46e0.tar.gz
gst-plugins-bad-2ab07d030f65bb8c1c2c4681678fc49f8e7a46e0.tar.bz2
gst-plugins-bad-2ab07d030f65bb8c1c2c4681678fc49f8e7a46e0.zip
ext/audiofile/gstafparse.c: Portability fix for non-exported function (#305435).
Original commit message from CVS: * ext/audiofile/gstafparse.c: (gst_afparse_class_init), (gst_afparse_init), (gst_afparse_finalize): Portability fix for non-exported function (#305435).
-rw-r--r--ChangeLog6
-rw-r--r--ext/audiofile/gstafparse.c19
2 files changed, 23 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2bcc6ed1..6c9a436e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-03 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
+ * ext/audiofile/gstafparse.c: (gst_afparse_class_init),
+ (gst_afparse_init), (gst_afparse_finalize):
+ Portability fix for non-exported function (#305435).
+
2005-06-02 Tim-Philipp Müller <tim at centricular dot net>
* gst/audiorate/gstaudiorate.c: (gst_audiorate_chain):
diff --git a/ext/audiofile/gstafparse.c b/ext/audiofile/gstafparse.c
index 4eece0c8..5f39740c 100644
--- a/ext/audiofile/gstafparse.c
+++ b/ext/audiofile/gstafparse.c
@@ -74,6 +74,7 @@ static GstStaticPadTemplate afparse_sink_factory =
static void gst_afparse_base_init (gpointer g_class);
static void gst_afparse_class_init (GstAFParseClass * klass);
static void gst_afparse_init (GstAFParse * afparse);
+static void gst_afparse_finalize (GObject * object);
static gboolean gst_afparse_open_file (GstAFParse * afparse);
static void gst_afparse_close_file (GstAFParse * afparse);
@@ -93,6 +94,8 @@ static long gst_afparse_vf_seek (AFvirtualfile * vfile, long offset,
int is_relative);
static long gst_afparse_vf_tell (AFvirtualfile * vfile);
+static GstElementClass *parent_class = NULL;
+
GType
gst_afparse_get_type (void)
{
@@ -140,9 +143,11 @@ gst_afparse_class_init (GstAFParseClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
+ parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
+
gobject_class->set_property = gst_afparse_set_property;
gobject_class->get_property = gst_afparse_get_property;
-
+ gobject_class->finalize = gst_afparse_finalize;
}
static void
@@ -161,7 +166,7 @@ gst_afparse_init (GstAFParse * afparse)
gst_element_set_loop_function (GST_ELEMENT (afparse), gst_afparse_loop);
- afparse->vfile = af_virtual_file_new ();
+ afparse->vfile = g_new (AFvirtualfile, 1);
afparse->vfile->closure = NULL;
afparse->vfile->read = gst_afparse_vf_read;
afparse->vfile->length = gst_afparse_vf_length;
@@ -186,6 +191,16 @@ gst_afparse_init (GstAFParse * afparse)
}
static void
+gst_afparse_finalize (GObject * obj)
+{
+ GstAFParse *afparse = GST_AFPARSE (obj);
+
+ g_free (afparse->file);
+
+ G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
gst_afparse_loop (GstElement * element)
{
GstAFParse *afparse;