From 13b636e7fd1b4a18e17ed598ab3ffccb4774027c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 3 Jul 2010 13:56:33 +0200 Subject: [PATCH] gconf: Create the ghostpad of the switchsink from the template --- ext/gconf/gstswitchsink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/gconf/gstswitchsink.c b/ext/gconf/gstswitchsink.c index 455f3490ac..b62ba00b7f 100644 --- a/ext/gconf/gstswitchsink.c +++ b/ext/gconf/gstswitchsink.c @@ -85,7 +85,11 @@ gst_switch_sink_reset (GstSwitchSink * sink) static void gst_switch_sink_init (GstSwitchSink * sink, GstSwitchSinkClass * g_class) { - sink->pad = gst_ghost_pad_new_no_target ("sink", GST_PAD_SINK); + GstElementClass *eklass = GST_ELEMENT_GET_CLASS (sink); + GstPadTemplate *templ; + + templ = gst_element_class_get_pad_template (eklass, "sink"); + sink->pad = gst_ghost_pad_new_no_target_from_template ("sink", templ); gst_element_add_pad (GST_ELEMENT (sink), sink->pad); gst_switch_sink_reset (sink);