mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 03:45:39 +00:00
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:
parent
abc243fee4
commit
9000bc86df
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue