diff options
author | Stefan Kost <ensonic@users.sourceforge.net> | 2007-09-24 10:53:37 +0000 |
---|---|---|
committer | Stefan Kost <ensonic@users.sourceforge.net> | 2007-09-24 10:53:37 +0000 |
commit | 1af510f8d54ddeb58f1c8e6db3f4fe45d21dd026 (patch) | |
tree | 5562881810015d176f8ed198f09a9f1f2dc8e602 /gst/festival | |
parent | 9525b8056fb7dbd279b4622c56e84beca56c0ad4 (diff) | |
download | gst-plugins-bad-1af510f8d54ddeb58f1c8e6db3f4fe45d21dd026.tar.gz gst-plugins-bad-1af510f8d54ddeb58f1c8e6db3f4fe45d21dd026.tar.bz2 gst-plugins-bad-1af510f8d54ddeb58f1c8e6db3f4fe45d21dd026.zip |
Massive leak fixing, plus code cleanups.
Original commit message from CVS:
* ext/audioresample/gstaudioresample.c:
* ext/x264/gstx264enc.c:
* gst/dvdspu/gstdvdspu.c:
* gst/dvdspu/gstdvdspu.h:
* gst/festival/gstfestival.c:
* gst/h264parse/gsth264parse.c:
* gst/mpegtsparse/mpegtspacketizer.c:
* gst/mpegtsparse/mpegtsparse.c:
* gst/multifile/gstmultifilesink.c:
* gst/multifile/gstmultifilesrc.c:
* gst/nuvdemux/gstnuvdemux.c:
* sys/dshowsrcwrapper/gstdshowaudiosrc.c:
* sys/dshowsrcwrapper/gstdshowvideosrc.c:
* sys/vcd/vcdsrc.c:
Massive leak fixing, plus code cleanups.
Diffstat (limited to 'gst/festival')
-rw-r--r-- | gst/festival/gstfestival.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gst/festival/gstfestival.c b/gst/festival/gstfestival.c index 0d8395c9..7a147c95 100644 --- a/gst/festival/gstfestival.c +++ b/gst/festival/gstfestival.c @@ -97,6 +97,8 @@ GST_DEBUG_CATEGORY_STATIC (festival_debug); #define GST_CAT_DEFAULT festival_debug +static void gst_festival_finalize (GObject * object); + static void gst_festival_base_init (gpointer g_class); static void gst_festival_class_init (GstFestivalClass * klass); static void gst_festival_init (GstFestival * festival); @@ -189,13 +191,17 @@ gst_festival_base_init (gpointer g_class) static void gst_festival_class_init (GstFestivalClass * klass) { + GObjectClass *gobject_class; GstElementClass *gstelement_class; - gstelement_class = (GstElementClass *) klass; + gobject_class = G_OBJECT_CLASS (klass); + gstelement_class = GST_ELEMENT_CLASS (klass); parent_class = g_type_class_peek_parent (klass); - gstelement_class->change_state = gst_festival_change_state; + gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_festival_finalize); + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_festival_change_state); } static void @@ -213,6 +219,16 @@ gst_festival_init (GstFestival * festival) festival->info = festival_default_info (); } +static void +gst_festival_finalize (GObject * object) +{ + GstFestival *festival = GST_FESTIVAL (object); + + g_free (festival->info); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + static gboolean read_response (GstFestival * festival) { |