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

Let's not accidentally call other GStreamer API before that.
This commit is contained in:
Sebastian Dröge 2019-03-13 07:31:43 +01:00
parent abc243fee4
commit 9000bc86df
2 changed files with 4 additions and 3 deletions

View file

@ -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 */

View file

@ -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);