summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2017-11-24 17:06:22 -0500
committerTim-Philipp Müller <tim@centricular.com>2017-12-09 19:32:31 +0000
commitecab99a7a94f927f494e419eca915b7b87077abf (patch)
treed5781c21b31aa87bc0ee494a413149a707ce530a
parent9e208ba0b6bea2372f55746c7b4a38161f27480d (diff)
sdlshare: Destroy GL backend buffer before the GL Context
This was otherwise leading to a deadlock in the GL library.
-rw-r--r--tests/examples/gl/sdl/sdlshare.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/examples/gl/sdl/sdlshare.c b/tests/examples/gl/sdl/sdlshare.c
index 4cbac2615..29272f224 100644
--- a/tests/examples/gl/sdl/sdlshare.c
+++ b/tests/examples/gl/sdl/sdlshare.c
@@ -394,15 +394,6 @@ main (int argc, char **argv)
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
gst_object_unref (pipeline);
- /* turn on back sdl opengl context */
-#ifdef WIN32
- wglMakeCurrent (sdl_dc, sdl_gl_context);
-#else
- glXMakeCurrent (sdl_display, None, 0);
-#endif
-
- SDL_Quit ();
-
/* make sure there is no pending gst gl buffer in the communication queues
* between sdl and gst-gl
*/
@@ -416,5 +407,14 @@ main (int argc, char **argv)
gst_buffer_unref (buf);
}
+ /* turn on back sdl opengl context */
+#ifdef WIN32
+ wglMakeCurrent (sdl_dc, sdl_gl_context);
+#else
+ glXMakeCurrent (sdl_display, None, 0);
+#endif
+
+ SDL_Quit ();
+
return 0;
}