diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2007-03-04 13:52:03 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2007-03-04 13:52:03 +0000 |
commit | de1357a4074d7cab9df163237bcfbce653d417e7 (patch) | |
tree | fe0a5f3335039c705d0d7c1b2f1c2367eac4231e /gst/flx/gstflxdec.c | |
parent | 382d7f0ba54a4752275446e613b1b295203e9dbf (diff) |
Fix a bunch of leaks shown by the newly-added states test.
Original commit message from CVS:
* ext/flac/gstflacenc.c: (gst_flac_enc_finalize):
* ext/gconf/gstgconfaudiosink.c: (gst_gconf_audio_sink_class_init),
(gst_gconf_audio_sink_dispose), (gst_gconf_audio_sink_finalize):
* ext/gconf/gstgconfaudiosrc.c: (gst_gconf_audio_src_base_init),
(gst_gconf_audio_src_class_init), (gst_gconf_audio_src_dispose),
(gst_gconf_audio_src_finalize), (do_toggle_element):
* ext/gconf/gstgconfvideosink.c: (gst_gconf_video_sink_base_init),
(gst_gconf_video_sink_class_init), (gst_gconf_video_sink_finalize),
(do_toggle_element):
* ext/gconf/gstgconfvideosrc.c: (gst_gconf_video_src_base_init),
(gst_gconf_video_src_class_init), (gst_gconf_video_src_dispose),
(gst_gconf_video_src_finalize), (do_toggle_element):
* ext/gconf/gstswitchsink.c: (gst_switch_sink_class_init),
(gst_switch_sink_reset), (gst_switch_sink_set_child):
* ext/hal/gsthalaudiosink.c: (gst_hal_audio_sink_base_init):
* ext/hal/gsthalaudiosrc.c: (gst_hal_audio_src_base_init):
* ext/shout2/gstshout2.c: (gst_shout2send_class_init),
(gst_shout2send_init), (gst_shout2send_finalize):
* gst/debug/testplugin.c: (gst_test_class_init),
(gst_test_finalize):
* gst/flx/gstflxdec.c: (gst_flxdec_class_init),
(gst_flxdec_dispose):
* gst/multipart/multipartmux.c: (gst_multipart_mux_finalize):
* gst/rtp/gstrtpmp4gpay.c: (gst_rtp_mp4g_pay_finalize):
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init),
(gst_rtspsrc_finalize):
* gst/rtsp/rtspextwms.c: (rtsp_ext_wms_free_context):
* gst/rtsp/rtspextwms.h:
* gst/smpte/gstsmpte.c: (gst_smpte_class_init),
(gst_smpte_finalize):
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_finalize):
* gst/udp/gstudpsink.c: (gst_udpsink_class_init),
(gst_udpsink_finalize):
* gst/wavparse/gstwavparse.c: (gst_wavparse_dispose),
(gst_wavparse_sink_activate):
* sys/oss/gstosssink.c: (gst_oss_sink_finalise):
* sys/oss/gstosssrc.c: (gst_oss_src_class_init),
(gst_oss_src_finalize):
* sys/v4l2/gstv4l2object.c: (gst_v4l2_object_destroy):
* sys/v4l2/gstv4l2object.h:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_class_init),
(gst_v4l2src_finalize):
* sys/ximage/gstximagesrc.c: (gst_ximage_src_ximage_get):
Fix a bunch of leaks shown by the newly-added states test.
Diffstat (limited to 'gst/flx/gstflxdec.c')
-rw-r--r-- | gst/flx/gstflxdec.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index ec7f1981..6f9cb7fe 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -68,6 +68,7 @@ static GstStaticPadTemplate src_video_factory = GST_STATIC_PAD_TEMPLATE ("src", static void gst_flxdec_class_init (GstFlxDecClass * klass); static void gst_flxdec_base_init (GstFlxDecClass * klass); static void gst_flxdec_init (GstFlxDec * flxdec); +static void gst_flxdec_dispose (GstFlxDec * flxdec); static GstFlowReturn gst_flxdec_chain (GstPad * pad, GstBuffer * buf); @@ -134,6 +135,8 @@ gst_flxdec_class_init (GstFlxDecClass * klass) parent_class = g_type_class_peek_parent (klass); + gobject_class->dispose = (GObjectFinalizeFunc) gst_flxdec_dispose; + GST_DEBUG_CATEGORY_INIT (flxdec_debug, "flxdec", 0, "FLX video decoder"); gstelement_class->change_state = gst_flxdec_change_state; @@ -160,6 +163,17 @@ gst_flxdec_init (GstFlxDec * flxdec) flxdec->adapter = gst_adapter_new (); } +static void +gst_flxdec_dispose (GstFlxDec * flxdec) +{ + if (flxdec->adapter) { + g_object_unref (flxdec->adapter); + flxdec->adapter = NULL; + } + + G_OBJECT_CLASS (parent_class)->dispose ((GObject *) flxdec); +} + static gboolean gst_flxdec_src_query_handler (GstPad * pad, GstQuery * query) { |