<div dir="ltr">Hi,<div><br></div><div>In a gstreamer plugin I am maintaining, two static, one src and one sink pads are getting created in init function of a decoder element by following code:<div><br></div><div><div> // Create the sink pad.</div>
<div> template =</div><div> gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,</div><div> gst_static_caps_get (sink_scaps));</div><div> pad = ismd_gst_pad_new_from_template (template, name);</div>
<div> gst_object_unref (template);</div><div> g_free (name);</div><div><br></div><div> // Now that we have a sink pad, let everyone know</div><div> ismd_gst_element_register_sinkpad (smd_element, pad);</div><div> gst_element_add_pad (GST_ELEMENT (smd_element), GST_PAD (pad));</div>
<div><br></div><div> template =</div><div> gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,</div><div> gst_static_caps_get (source_scaps));</div><div><br></div><div> for (i = 1; i <= count; i++) {</div>
<div> // Create the source pad.</div><div> name = g_strdup_printf ("src_%d", i);</div><div> pad = ismd_gst_pad_new_from_template (template, name);</div><div><br></div><div> // Now that we have a source pad, let everyone know</div>
<div> ismd_gst_element_register_srcpad (smd_element, pad);</div><div> gst_element_add_pad (GST_ELEMENT (smd_element), GST_PAD (pad));</div><div> g_free (name);</div><div> }</div><div> gst_object_unref (template);</div>
<div>}</div><div><br></div><div>but these pads are not getting removed in finalize method .I have an event associated with src pad of this decoder element which is not getting freed up when decode element is removed because this event is set to be removed in the method which removes pads of this plugin.But there is no code explicitly calling the method meant to remove pads, for these static pads of decoder element so event is also not getting freed up.This is causing event leak in the system.</div>
<div><br></div><div>It is not required to remove static pads when element finalizes? Can somebody provide some inputs on this problem?</div><div><br></div><div>Thanks,</div><div>Yogesh</div><div><br></div><div><br></div><div>
<br></div><div><br></div></div></div></div>