summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2017-11-24 17:06:22 -0500
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2017-11-24 17:06:22 -0500
commitee0212b83d7a771b98b14a8cdc28322853ce37bc (patch)
treef6b7511b0af6a02137ffbfcbee9bbbc0e5fe63bf
parent4f36f75eb1e944bac0aaabc6c4c4aebf67b77251 (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;
}