From 50f4eb876a9d272847e22e3349309ce3f7ac42dc Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 15 Mar 2006 16:17:12 +0000 Subject: Fix memleak with gst_static_pad_template_get(). Original commit message from CVS: * ext/cairo/gsttextoverlay.c: (gst_text_overlay_init): * ext/dv/gstdvdemux.c: (gst_dvdemux_init), (gst_dvdemux_add_pads): * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_init): * ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_init), (gst_jpeg_dec_setcaps): * ext/jpeg/gstjpegenc.c: (gst_jpegenc_init): * ext/jpeg/gstsmokedec.c: (gst_smokedec_init): * ext/jpeg/gstsmokeenc.c: (gst_smokeenc_init): * ext/libmng/gstmngdec.c: (gst_mngdec_init), (gst_mngdec_src_getcaps): * ext/libpng/gstpngdec.c: (gst_pngdec_init), (gst_pngdec_caps_create_and_set): * ext/libpng/gstpngenc.c: (gst_pngenc_init): * ext/mikmod/gstmikmod.c: (gst_mikmod_init): * ext/speex/gstspeexdec.c: (gst_speex_dec_init): * gst/alpha/gstalpha.c: (gst_alpha_init): * gst/auparse/gstauparse.c: (gst_au_parse_init): * gst/avi/gstavidemux.c: (gst_avi_demux_init), (gst_avi_demux_handle_src_event), (gst_avi_demux_parse_stream): * gst/cutter/gstcutter.c: (gst_cutter_init): * gst/debug/efence.c: (gst_efence_init), (gst_efence_getrange), (gst_efence_checkgetrange): * gst/debug/negotiation.c: (gst_negotiation_init): * gst/flx/gstflxdec.c: (gst_flxdec_init): * gst/goom/gstgoom.c: (gst_goom_init): * gst/rtp/gstasteriskh263.c: (gst_asteriskh263_init): * gst/rtp/gstrtpL16depay.c: (gst_rtp_L16depay_init): * gst/rtp/gstrtpL16pay.c: (gst_rtpL16pay_init): * gst/rtp/gstrtpamrdepay.c: (gst_rtp_amr_depay_init): * gst/rtp/gstrtpdepay.c: (gst_rtp_depay_init): * gst/rtp/gstrtpmpadepay.c: (gst_rtp_mpa_depay_init): * gst/rtsp/gstrtpdec.c: (gst_rtpdec_init): * gst/smpte/gstsmpte.c: (gst_smpte_init): * gst/wavparse/gstwavparse.c: (gst_wavparse_init), (gst_wavparse_create_sourcepad): Fix memleak with gst_static_pad_template_get(). This uses gst_pad_new_from_static_template() instead. Fixes #333512 --- ext/dv/gstdvdemux.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'ext/dv') diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c index eb5b98b4..221a12c0 100644 --- a/ext/dv/gstdvdemux.c +++ b/ext/dv/gstdvdemux.c @@ -215,9 +215,7 @@ gst_dvdemux_init (GstDVDemux * dvdemux, GstDVDemuxClass * g_class) { gint i; - dvdemux->sinkpad = - gst_pad_new_from_template (gst_static_pad_template_get (&sink_temp), - "sink"); + dvdemux->sinkpad = gst_pad_new_from_static_template (&sink_temp, "sink"); /* we can operate in pull and push mode so we install * a custom activate function */ gst_pad_set_activate_function (dvdemux->sinkpad, @@ -297,8 +295,7 @@ static void gst_dvdemux_add_pads (GstDVDemux * dvdemux) { dvdemux->videosrcpad = - gst_pad_new_from_template (gst_static_pad_template_get (&video_src_temp), - "video"); + gst_pad_new_from_static_template (&video_src_temp, "video"); gst_pad_set_query_function (dvdemux->videosrcpad, GST_DEBUG_FUNCPTR (gst_dvdemux_src_query)); gst_pad_set_query_type_function (dvdemux->videosrcpad, @@ -309,8 +306,7 @@ gst_dvdemux_add_pads (GstDVDemux * dvdemux) gst_element_add_pad (GST_ELEMENT (dvdemux), dvdemux->videosrcpad); dvdemux->audiosrcpad = - gst_pad_new_from_template (gst_static_pad_template_get (&audio_src_temp), - "audio"); + gst_pad_new_from_static_template (&audio_src_temp, "audio"); gst_pad_set_query_function (dvdemux->audiosrcpad, GST_DEBUG_FUNCPTR (gst_dvdemux_src_query)); gst_pad_set_query_type_function (dvdemux->audiosrcpad, -- cgit