decodebin: fix one more pad template ref leak
This commit is contained in:
parent
7c5e39664e
commit
8a423f8f00
@ -899,6 +899,7 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps,
|
|||||||
* create a ghostpad for this pad. It's possible that the caps are not
|
* create a ghostpad for this pad. It's possible that the caps are not
|
||||||
* fixed. */
|
* fixed. */
|
||||||
if (mimetype_is_raw (mimetype)) {
|
if (mimetype_is_raw (mimetype)) {
|
||||||
|
GstPadTemplate *tmpl;
|
||||||
gchar *padname;
|
gchar *padname;
|
||||||
GstPad *ghost;
|
GstPad *ghost;
|
||||||
PadProbeData *data;
|
PadProbeData *data;
|
||||||
@ -919,8 +920,10 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps,
|
|||||||
decode_bin->numpads++;
|
decode_bin->numpads++;
|
||||||
|
|
||||||
/* make it a ghostpad */
|
/* make it a ghostpad */
|
||||||
ghost = gst_ghost_pad_new_from_template (padname, pad,
|
tmpl = gst_static_pad_template_get (&decoder_bin_src_template);
|
||||||
gst_static_pad_template_get (&decoder_bin_src_template));
|
ghost = gst_ghost_pad_new_from_template (padname, pad, tmpl);
|
||||||
|
gst_object_unref (tmpl);
|
||||||
|
|
||||||
gst_pad_set_active (ghost, TRUE);
|
gst_pad_set_active (ghost, TRUE);
|
||||||
gst_element_add_pad (GST_ELEMENT (decode_bin), ghost);
|
gst_element_add_pad (GST_ELEMENT (decode_bin), ghost);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user