fix a number of memleaks

Original commit message from CVS:
fix a number of memleaks
This commit is contained in:
Colin Walters 2004-05-07 20:26:46 +00:00
parent e9d760851b
commit 39a537b7ae
2 changed files with 26 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2004-05-07 Colin Walters <walters@redhat.com>
* gst/volume/gstvolume.c (gst_volume_dispose): Unref dpman.
* ext/flac/gstflacdec.c (gst_flacdec_dispose): Add dispose
function.
* gst/audioscale/gstaudioscale.c (gst_audioscale_dispose):
Add dispose function.
2004-05-08 Jan Schmidt <thaytan@mad.scientist.com> 2004-05-08 Jan Schmidt <thaytan@mad.scientist.com>
* ext/dv/gstdvdec.c: (gst_dvdec_video_link): * ext/dv/gstdvdec.c: (gst_dvdec_video_link):
Fix caps nego and pad templates. RGB mode caps should Fix caps nego and pad templates. RGB mode caps should

View file

@ -56,6 +56,7 @@ enum
static void gst_flacdec_base_init (gpointer g_class); static void gst_flacdec_base_init (gpointer g_class);
static void gst_flacdec_class_init (FlacDecClass * klass); static void gst_flacdec_class_init (FlacDecClass * klass);
static void gst_flacdec_init (FlacDec * flacdec); static void gst_flacdec_init (FlacDec * flacdec);
static void gst_flacdec_dispose (GObject * object);
static void gst_flacdec_loop (GstElement * element); static void gst_flacdec_loop (GstElement * element);
static GstElementStateReturn gst_flacdec_change_state (GstElement * element); static GstElementStateReturn gst_flacdec_change_state (GstElement * element);
@ -168,6 +169,8 @@ gst_flacdec_class_init (FlacDecClass * klass)
parent_class = g_type_class_ref (GST_TYPE_ELEMENT); parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
gobject_class->dispose = gst_flacdec_dispose;
gstelement_class->change_state = gst_flacdec_change_state; gstelement_class->change_state = gst_flacdec_change_state;
} }
@ -227,6 +230,21 @@ gst_flacdec_init (FlacDec * flacdec)
FLAC__seekable_stream_decoder_set_client_data (flacdec->decoder, flacdec); FLAC__seekable_stream_decoder_set_client_data (flacdec->decoder, flacdec);
} }
static void
gst_flacdec_dispose (GObject * object)
{
FlacDec *flacdec;
flacdec = GST_FLACDEC (object);
if (flacdec->decoder)
FLAC__seekable_stream_decoder_delete (flacdec->decoder);
flacdec->decoder = NULL;
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static gboolean static gboolean
gst_flacdec_update_metadata (FlacDec * flacdec, gst_flacdec_update_metadata (FlacDec * flacdec,
const FLAC__StreamMetadata * metadata) const FLAC__StreamMetadata * metadata)