mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
closes #333510.
Original commit message from CVS: * ext/pango/gsttextoverlay.c: (gst_text_overlay_init): * ext/pango/gsttextrender.c: (gst_text_render_init): * gst/adder/gstadder.c: (gst_adder_init): Don't leak padtemplates, patch by Christophe Fergeau, closes #333510.
This commit is contained in:
parent
b57078cd60
commit
66db4c0a0a
4 changed files with 32 additions and 18 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2006-03-09 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* ext/pango/gsttextoverlay.c: (gst_text_overlay_init):
|
||||||
|
* ext/pango/gsttextrender.c: (gst_text_render_init):
|
||||||
|
* gst/adder/gstadder.c: (gst_adder_init):
|
||||||
|
Don't leak padtemplates, patch by Christophe Fergeau,
|
||||||
|
closes #333510.
|
||||||
|
|
||||||
2006-03-09 Tim-Philipp Müller <tim at centricular dot net>
|
2006-03-09 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst/subparse/gstsubparse.c: (gst_subparse_type_find):
|
* gst/subparse/gstsubparse.c: (gst_subparse_type_find):
|
||||||
|
|
|
@ -391,10 +391,12 @@ gst_text_overlay_finalize (GObject * object)
|
||||||
static void
|
static void
|
||||||
gst_text_overlay_init (GstTextOverlay * overlay, GstTextOverlayClass * klass)
|
gst_text_overlay_init (GstTextOverlay * overlay, GstTextOverlayClass * klass)
|
||||||
{
|
{
|
||||||
|
GstPadTemplate *template;
|
||||||
|
|
||||||
/* video sink */
|
/* video sink */
|
||||||
overlay->video_sinkpad =
|
template = gst_static_pad_template_get (&video_sink_template_factory);
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get
|
overlay->video_sinkpad = gst_pad_new_from_template (template, "video_sink");
|
||||||
(&video_sink_template_factory), "video_sink");
|
gst_object_unref (template);
|
||||||
gst_pad_set_getcaps_function (overlay->video_sinkpad,
|
gst_pad_set_getcaps_function (overlay->video_sinkpad,
|
||||||
GST_DEBUG_FUNCPTR (gst_text_overlay_getcaps));
|
GST_DEBUG_FUNCPTR (gst_text_overlay_getcaps));
|
||||||
gst_pad_set_setcaps_function (overlay->video_sinkpad,
|
gst_pad_set_setcaps_function (overlay->video_sinkpad,
|
||||||
|
@ -407,9 +409,9 @@ gst_text_overlay_init (GstTextOverlay * overlay, GstTextOverlayClass * klass)
|
||||||
|
|
||||||
if (!GST_IS_TIME_OVERLAY_CLASS (klass) && !GST_IS_CLOCK_OVERLAY_CLASS (klass)) {
|
if (!GST_IS_TIME_OVERLAY_CLASS (klass) && !GST_IS_CLOCK_OVERLAY_CLASS (klass)) {
|
||||||
/* text sink */
|
/* text sink */
|
||||||
overlay->text_sinkpad =
|
template = gst_static_pad_template_get (&text_sink_template_factory);
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get
|
overlay->text_sinkpad = gst_pad_new_from_template (template, "text_sink");
|
||||||
(&text_sink_template_factory), "text_sink");
|
gst_object_unref (template);
|
||||||
gst_pad_set_setcaps_function (overlay->text_sinkpad,
|
gst_pad_set_setcaps_function (overlay->text_sinkpad,
|
||||||
GST_DEBUG_FUNCPTR (gst_text_overlay_setcaps_txt));
|
GST_DEBUG_FUNCPTR (gst_text_overlay_setcaps_txt));
|
||||||
gst_pad_set_event_function (overlay->text_sinkpad,
|
gst_pad_set_event_function (overlay->text_sinkpad,
|
||||||
|
@ -424,9 +426,9 @@ gst_text_overlay_init (GstTextOverlay * overlay, GstTextOverlayClass * klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (video) source */
|
/* (video) source */
|
||||||
overlay->srcpad =
|
template = gst_static_pad_template_get (&src_template_factory);
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get
|
overlay->srcpad = gst_pad_new_from_template (template, "src");
|
||||||
(&src_template_factory), "src");
|
gst_object_unref (template);
|
||||||
gst_pad_set_getcaps_function (overlay->srcpad,
|
gst_pad_set_getcaps_function (overlay->srcpad,
|
||||||
GST_DEBUG_FUNCPTR (gst_text_overlay_getcaps));
|
GST_DEBUG_FUNCPTR (gst_text_overlay_getcaps));
|
||||||
gst_pad_set_event_function (overlay->srcpad,
|
gst_pad_set_event_function (overlay->srcpad,
|
||||||
|
|
|
@ -326,18 +326,20 @@ gst_text_render_finalize (GObject * object)
|
||||||
static void
|
static void
|
||||||
gst_text_render_init (GstTextRender * render, GstTextRenderClass * klass)
|
gst_text_render_init (GstTextRender * render, GstTextRenderClass * klass)
|
||||||
{
|
{
|
||||||
|
GstPadTemplate *template;
|
||||||
|
|
||||||
/* sink */
|
/* sink */
|
||||||
render->sinkpad =
|
template = gst_static_pad_template_get (&sink_template_factory);
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get
|
render->sinkpad = gst_pad_new_from_template (template, "sink");
|
||||||
(&sink_template_factory), "sink");
|
gst_object_unref (template);
|
||||||
gst_pad_set_chain_function (render->sinkpad,
|
gst_pad_set_chain_function (render->sinkpad,
|
||||||
GST_DEBUG_FUNCPTR (gst_text_render_chain));
|
GST_DEBUG_FUNCPTR (gst_text_render_chain));
|
||||||
gst_element_add_pad (GST_ELEMENT (render), render->sinkpad);
|
gst_element_add_pad (GST_ELEMENT (render), render->sinkpad);
|
||||||
|
|
||||||
/* source */
|
/* source */
|
||||||
render->srcpad =
|
template = gst_static_pad_template_get (&src_template_factory);
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get
|
render->srcpad = gst_pad_new_from_template (template, "src");
|
||||||
(&src_template_factory), "src");
|
gst_object_unref (template);
|
||||||
gst_pad_set_fixatecaps_function (render->srcpad,
|
gst_pad_set_fixatecaps_function (render->srcpad,
|
||||||
GST_DEBUG_FUNCPTR (gst_text_render_fixate_caps));
|
GST_DEBUG_FUNCPTR (gst_text_render_fixate_caps));
|
||||||
gst_pad_set_setcaps_function (render->srcpad,
|
gst_pad_set_setcaps_function (render->srcpad,
|
||||||
|
|
|
@ -272,9 +272,11 @@ gst_adder_class_init (GstAdderClass * klass)
|
||||||
static void
|
static void
|
||||||
gst_adder_init (GstAdder * adder)
|
gst_adder_init (GstAdder * adder)
|
||||||
{
|
{
|
||||||
adder->srcpad =
|
GstPadTemplate *template;
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get
|
|
||||||
(&gst_adder_src_template), "src");
|
template = gst_static_pad_template_get (&gst_adder_src_template);
|
||||||
|
adder->srcpad = gst_pad_new_from_template (template, "src");
|
||||||
|
gst_object_unref (template);
|
||||||
gst_pad_set_getcaps_function (adder->srcpad,
|
gst_pad_set_getcaps_function (adder->srcpad,
|
||||||
GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps));
|
GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps));
|
||||||
gst_pad_set_setcaps_function (adder->srcpad,
|
gst_pad_set_setcaps_function (adder->srcpad,
|
||||||
|
|
Loading…
Reference in a new issue