diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index fc1f813e42..afb8d60abf 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -404,7 +404,8 @@ gst_decode_bin_init (GstDecodeBin * decode_bin) pad = gst_element_get_static_pad (decode_bin->typefind, "sink"); /* ghost the sink pad to ourself */ - gpad = gst_ghost_pad_new ("sink", pad); + gpad = gst_ghost_pad_new_from_template ("sink", pad, + gst_static_pad_template_get (&decoder_bin_sink_template)); gst_pad_set_active (gpad, TRUE); gst_element_add_pad (GST_ELEMENT (decode_bin), gpad); @@ -914,7 +915,8 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps, decode_bin->numpads++; /* make it a ghostpad */ - ghost = gst_ghost_pad_new (padname, pad); + ghost = gst_ghost_pad_new_from_template (padname, pad, + gst_static_pad_template_get (&decoder_bin_src_template)); gst_pad_set_active (ghost, TRUE); gst_element_add_pad (GST_ELEMENT (decode_bin), ghost); diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 72beab5f59..f8c459fe53 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -931,7 +931,8 @@ gst_decode_bin_init (GstDecodeBin * decode_bin) pad = gst_element_get_static_pad (decode_bin->typefind, "sink"); /* ghost the sink pad to ourself */ - gpad = gst_ghost_pad_new ("sink", pad); + gpad = gst_ghost_pad_new_from_template ("sink", pad, + gst_static_pad_template_get (&decoder_bin_sink_template)); gst_pad_set_active (gpad, TRUE); gst_element_add_pad (GST_ELEMENT (decode_bin), gpad); @@ -3401,6 +3402,7 @@ gst_decode_pad_new (GstDecodeBin * dbin, GstPad * pad, GstDecodeChain * chain) GST_DEBUG_OBJECT (dbin, "making new decodepad"); dpad = g_object_new (GST_TYPE_DECODE_PAD, "direction", GST_PAD_DIRECTION (pad), + "template", gst_static_pad_template_get (&decoder_bin_src_template), NULL); gst_ghost_pad_construct (GST_GHOST_PAD_CAST (dpad)); gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (dpad), pad); diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c index f71c4099a2..19af7d1497 100644 --- a/gst/playback/gsturidecodebin.c +++ b/gst/playback/gsturidecodebin.c @@ -842,7 +842,8 @@ new_decoded_pad_cb (GstElement * element, GstPad * pad, gboolean last, decoder->numpads++; GST_URI_DECODE_BIN_UNLOCK (decoder); - newpad = gst_ghost_pad_new (padname, pad); + newpad = gst_ghost_pad_new_from_template (padname, pad, + gst_static_pad_template_get (&srctemplate)); g_free (padname); /* store ref to the ghostpad so we can remove it */