mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
autovideoconvert: Don't leak pad templates created from static pad templates
This commit is contained in:
parent
530eca9984
commit
ec85dfaa61
1 changed files with 2 additions and 0 deletions
|
@ -230,6 +230,7 @@ gst_auto_video_convert_init (GstAutoVideoConvert * autovideoconvert,
|
|||
/* add sink ghost pad */
|
||||
gst_element_add_pad (GST_ELEMENT (autovideoconvert),
|
||||
autovideoconvert->sinkpad);
|
||||
gst_object_unref (pad_tmpl);
|
||||
|
||||
/* get src pad template */
|
||||
pad_tmpl = gst_static_pad_template_get (&srctemplate);
|
||||
|
@ -238,6 +239,7 @@ gst_auto_video_convert_init (GstAutoVideoConvert * autovideoconvert,
|
|||
/* add src ghost pad */
|
||||
gst_element_add_pad (GST_ELEMENT (autovideoconvert),
|
||||
autovideoconvert->srcpad);
|
||||
gst_object_unref (pad_tmpl);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue