diff --git a/gst-libs/gst/gl/gstglcontext.h b/gst-libs/gst/gl/gstglcontext.h
index 55db6cc..2f1b6a7 100644
--- a/gst-libs/gst/gl/gstglcontext.h
+++ b/gst-libs/gst/gl/gstglcontext.h
@@ -135,6 +135,9 @@ GstGLWindow * gst_gl_context_get_window (GstGLContext *context);
 void gst_gl_context_thread_add (GstGLContext * context,
     GstGLContextThreadFunc func, gpointer data);
 
+void 
+gst_gl_context_set_share_context (void* share_context);
+
 G_END_DECLS
 
 #endif /* __GST_GL_CONTEXT_H__ */
diff --git a/gst-libs/gst/gl/win32/gstglcontext_wgl.c b/gst-libs/gst/gl/win32/gstglcontext_wgl.c
index bc3ea26..9bc75a1 100644
--- a/gst-libs/gst/gl/win32/gstglcontext_wgl.c
+++ b/gst-libs/gst/gl/win32/gstglcontext_wgl.c
@@ -29,6 +29,7 @@
 #include <gst/gl/gstglcontext.h>
 
 #include "gstglcontext_wgl.h"
+#include <gl/wglext.h>
 
 #define gst_gl_context_wgl_parent_class parent_class
 G_DEFINE_TYPE (GstGLContextWGL, gst_gl_context_wgl, GST_GL_TYPE_CONTEXT);
@@ -86,14 +87,26 @@ gst_gl_context_wgl_new (void)
   return context;
 }
 
+static void *share = NULL;
+
+void
+gst_gl_context_set_share_context (void *share_context)
+{
+  share = share_context;
+}
+
+PFNWGLCREATECONTEXTATTRIBSARBPROC func = NULL;
+
+
 static gboolean
 gst_gl_context_wgl_create_context (GstGLContext * context,
-    GstGLAPI gl_api, GstGLContext * other_context, GError ** error)
+    GstGLAPI gl_api, GstGLContext * not_used, GError ** error)
 {
   GstGLWindow *window;
   GstGLContextWGL *context_wgl;
   HGLRC external_gl_context = NULL;
   HDC device;
+  GstGLContextWGL *other_context = share;
 
   context_wgl = GST_GL_CONTEXT_WGL (context);
   window = gst_gl_context_get_window (context);
@@ -125,12 +138,22 @@ gst_gl_context_wgl_create_context (GstGLContext * context,
       (guintptr) context_wgl->wgl_context);
 
   if (external_gl_context) {
-    if (!wglShareLists (external_gl_context, context_wgl->wgl_context)) {
+
+    wglMakeCurrent (device, context_wgl->wgl_context);
+
+    func = (PFNWGLCREATECONTEXTATTRIBSARBPROC)
+        wglGetProcAddress ("wglCreateContextAttribsARB");
+
+    if (func == NULL) {
       g_set_error (error, GST_GL_CONTEXT_ERROR,
           GST_GL_CONTEXT_ERROR_CREATE_CONTEXT, "failed to share contexts 0x%x",
           (unsigned int) GetLastError ());
       goto failure;
     }
+
+    wglMakeCurrent (device, 0);
+    context_wgl->wgl_context = func (device, external_gl_context, 0);
+    wglDeleteContext (context_wgl->wgl_context);
   }
 
   gst_object_unref (window);
diff --git a/gst-libs/gst/gl/x11/gstglcontext_glx.c b/gst-libs/gst/gl/x11/gstglcontext_glx.c
index aeff736..aea52d5 100644
--- a/gst-libs/gst/gl/x11/gstglcontext_glx.c
+++ b/gst-libs/gst/gl/x11/gstglcontext_glx.c
@@ -135,9 +135,18 @@ _describe_fbconfig (Display * display, GLXFBConfig config)
   GST_DEBUG ("stencil: %d", val);
 }
 
+static void *share = NULL;
+
+void
+gst_gl_context_set_share_context (void *share_context)
+{
+  share = share_context;
+}
+
+
 static gboolean
 gst_gl_context_glx_create_context (GstGLContext * context,
-    GstGLAPI gl_api, GstGLContext * other_context, GError ** error)
+    GstGLAPI gl_api, GstGLContext * not_used, GError ** error)
 {
   GstGLContextGLX *context_glx;
   GstGLWindow *window;
@@ -147,6 +156,7 @@ gst_gl_context_glx_create_context (GstGLContext * context,
   int x_error;
   Display *device;
   guintptr external_gl_context = 0;
+  GstGLContext *other_context = share;
 
   context_glx = GST_GL_CONTEXT_GLX (context);
   window = gst_gl_context_get_window (context);
