cairorender: Fix leaking of pad templates
This commit is contained in:
parent
5196ee5148
commit
c78b3b1332
@ -318,8 +318,7 @@ static void
|
|||||||
gst_cairo_render_init (GstCairoRender * c, GstCairoRenderClass * klass)
|
gst_cairo_render_init (GstCairoRender * c, GstCairoRenderClass * klass)
|
||||||
{
|
{
|
||||||
/* The sink */
|
/* The sink */
|
||||||
c->snk =
|
c->snk = gst_pad_new_from_static_template (&t_snk, "sink");
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get (&t_snk), "sink");
|
|
||||||
gst_pad_set_event_function (c->snk, gst_cairo_render_event);
|
gst_pad_set_event_function (c->snk, gst_cairo_render_event);
|
||||||
gst_pad_set_chain_function (c->snk, gst_cairo_render_chain);
|
gst_pad_set_chain_function (c->snk, gst_cairo_render_chain);
|
||||||
gst_pad_set_setcaps_function (c->snk, gst_cairo_render_setcaps_sink);
|
gst_pad_set_setcaps_function (c->snk, gst_cairo_render_setcaps_sink);
|
||||||
@ -327,8 +326,7 @@ gst_cairo_render_init (GstCairoRender * c, GstCairoRenderClass * klass)
|
|||||||
gst_element_add_pad (GST_ELEMENT (c), c->snk);
|
gst_element_add_pad (GST_ELEMENT (c), c->snk);
|
||||||
|
|
||||||
/* The source */
|
/* The source */
|
||||||
c->src =
|
c->src = gst_pad_new_from_static_template (&t_src, "src");
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get (&t_src), "src");
|
|
||||||
gst_pad_use_fixed_caps (c->src);
|
gst_pad_use_fixed_caps (c->src);
|
||||||
gst_element_add_pad (GST_ELEMENT (c), c->src);
|
gst_element_add_pad (GST_ELEMENT (c), c->src);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user