diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2002-09-09 19:32:19 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2002-09-09 19:32:19 +0000 |
commit | 8156d8078c6320661ba2f56a104538bedd5c7ee9 (patch) | |
tree | 6de703b427b854c2bcbc37b01f9e4b19e247d6df /ext | |
parent | b55bc351620e5380611ace3269c14c7e44d02627 (diff) |
this frees the decoder in object destruction. Thomas, you cna now add this plugin back to the build
Original commit message from CVS:
this frees the decoder in object destruction. Thomas, you cna now add this plugin back to the build
Diffstat (limited to 'ext')
-rw-r--r-- | ext/dv/gstdvdec.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index 87014129..10d09227 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -167,6 +167,7 @@ static GstTypeDefinition dv_definition = { /* A number of functon prototypes are given so we can refer to them later. */ static void gst_dvdec_class_init (GstDVDecClass *klass); static void gst_dvdec_init (GstDVDec *dvdec); +static void gst_dvdec_destroy (GObject *object); static gboolean gst_dvdec_src_query (GstPad *pad, GstPadQueryType type, GstFormat *format, gint64 *value); @@ -248,13 +249,22 @@ gst_dvdec_class_init (GstDVDecClass *klass) gobject_class->set_property = gst_dvdec_set_property; gobject_class->get_property = gst_dvdec_get_property; - + gobject_class->dispose = gst_dvdec_destroy; + gstelement_class->change_state = gst_dvdec_change_state; /* table initialization, only do once */ dv_init(0, 0); } +static void +gst_dvdec_destroy (GObject *object) +{ + GstDVDec *dvdec = GST_DVDEC(object); + + dv_decoder_free(dvdec->decoder); +} + /* This function is responsible for initializing a specific instance of * the plugin. */ |