From 8f1301390de7662292dd18cc6dd863062953a777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 20 Jul 2009 22:08:24 -0400 Subject: mimenc: Use gst_pad_new_from_static_template Prevents leak found by valgrind --- ext/mimic/gstmimenc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'ext/mimic') diff --git a/ext/mimic/gstmimenc.c b/ext/mimic/gstmimenc.c index 8ab76222..4a65b9fd 100644 --- a/ext/mimic/gstmimenc.c +++ b/ext/mimic/gstmimenc.c @@ -142,17 +142,13 @@ gst_mimenc_class_init (GstMimEncClass * klass) static void gst_mimenc_init (GstMimEnc * mimenc, GstMimEncClass * klass) { - mimenc->sinkpad = - gst_pad_new_from_template (gst_static_pad_template_get (&sink_factory), - "sink"); + mimenc->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink"); gst_element_add_pad (GST_ELEMENT (mimenc), mimenc->sinkpad); gst_pad_set_setcaps_function (mimenc->sinkpad, gst_mimenc_setcaps); gst_pad_set_chain_function (mimenc->sinkpad, gst_mimenc_chain); gst_pad_set_event_function (mimenc->sinkpad, gst_mimenc_event); - mimenc->srcpad = - gst_pad_new_from_template (gst_static_pad_template_get (&src_factory), - "src"); + mimenc->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); gst_element_add_pad (GST_ELEMENT (mimenc), mimenc->srcpad); mimenc->enc = NULL; -- cgit v1.2.1