From 7e8081c89e11378321c57f920c3a95fce03bfe87 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 27 Nov 2010 18:58:07 -0800 Subject: [PATCH] mpegtsmux: Fix some memleaks --- gst/mpegtsmux/mpegtsmux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index 20fa36e..c185039 100644 --- a/gst/mpegtsmux/mpegtsmux.c +++ b/gst/mpegtsmux/mpegtsmux.c @@ -211,8 +211,7 @@ static void mpegtsmux_init (MpegTsMux * mux, MpegTsMuxClass * g_class) { mux->srcpad = - gst_pad_new_from_template (gst_static_pad_template_get - (&mpegtsmux_src_factory), "src"); + gst_pad_new_from_static_template (&mpegtsmux_src_factory, "src"); gst_pad_use_fixed_caps (mux->srcpad); gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad); @@ -496,6 +495,7 @@ mpegtsmux_create_stream (MpegTsMux * mux, MpegTsPadData * ts_data, GstPad * pad) } beach: + gst_caps_unref (caps); return ret; } @@ -993,6 +993,7 @@ mpegtsdemux_set_header_on_caps (MpegTsMux * mux) gst_structure_set_value (structure, "streamheader", &array); gst_pad_set_caps (mux->srcpad, caps); g_value_unset (&array); + gst_caps_unref (caps); } static gboolean -- 2.7.4