? patch
Index: gstxwindow.c
===================================================================
RCS file: /cvsroot/gstreamer/gst-plugins/sys/xvideo/gstxwindow.c,v
retrieving revision 1.6.6.1
retrieving revision 1.7
diff -u -r1.6.6.1 -r1.7
Index: xvideosink.c
===================================================================
RCS file: /cvsroot/gstreamer/gst-plugins/sys/xvideo/xvideosink.c,v
retrieving revision 1.30.4.1
diff -u -r1.30.4.1 xvideosink.c
--- xvideosink.c	26 Jan 2003 11:12:08 -0000	1.30.4.1
+++ xvideosink.c	23 Feb 2003 22:27:07 -0000
@@ -76,8 +76,10 @@
 
 static GstCaps* 	gst_xvideosink_get_pad_template_caps (gboolean with_xv);
 
-static GstPadTemplate *sink_template;
-static GstCaps *formats;
+/* default template - initiated with class struct to allow gst-register to work
+   with X running */
+static GstPadTemplate *sink_template = NULL;
+static GstCaps *formats = NULL;
 
 static GstElementClass *parent_class = NULL;
 static guint gst_xvideosink_signals[LAST_SIGNAL] = { 0 };
@@ -161,7 +163,15 @@
   gstelement_class->change_state = gst_xvideosink_change_state;
   gstelement_class->set_clock = gst_xvideosink_set_clock;
   gstelement_class->release_locks = gst_xvideosink_release_locks;
-
+  
+  /* initiate default template */
+  formats = gst_xvideosink_get_pad_template_caps (TRUE);
+  sink_template = gst_pad_template_new (
+                      "sink",
+                      GST_PAD_SINK,
+                      GST_PAD_ALWAYS,
+                      formats,
+                      NULL);
 }
 
 static void
@@ -799,15 +809,15 @@
                                    &gst_xvideosink_details);
   g_return_val_if_fail(factory != NULL, FALSE);
 
-  formats = gst_xvideosink_get_pad_template_caps (TRUE);
-
-  sink_template = gst_pad_template_new (
-		  "sink",
+  gst_element_factory_add_pad_template (factory, 
+          gst_pad_template_new (
+                  "sink",
                   GST_PAD_SINK,
-  		  GST_PAD_ALWAYS,
-		  formats, NULL);
-
-  gst_element_factory_add_pad_template (factory, sink_template);
+                  GST_PAD_ALWAYS,
+                  gst_caps_new ("video_caps",
+                                "video/raw",
+                                NULL),
+                  NULL));
 
   gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
 
