Commit 9000bc86 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

examples/sdlshare: Call gst_init() a bit earlier in main()

Let's not accidentally call other GStreamer API before that.
parent abc243fe
......@@ -311,6 +311,8 @@ main (int argc, char **argv)
return -1;
}
gst_init (&argc, &argv);
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 0);
......@@ -329,8 +331,6 @@ main (int argc, char **argv)
sdl_gl_context = SDL_GL_CreateContext (sdl_window);
gst_init (&argc, &argv);
SDL_GL_MakeCurrent (sdl_window, sdl_gl_context);
/* Loop, drawing and checking events */
......
......@@ -311,6 +311,8 @@ main (int argc, char **argv)
return -1;
}
gst_init (&argc, &argv);
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 0);
......@@ -331,7 +333,6 @@ main (int argc, char **argv)
return -1;
}
gst_init (&argc, &argv);
loop = g_main_loop_new (NULL, FALSE);
SDL_GL_MakeCurrent (sdl_window, sdl_gl_context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment