Hi all
I am facing a strange issue i can’t solve nor understand
I use SDL1.3 on Android to display frames decoded by ffmpeg.
If the SDL renderer is directly created in the main(argc, argv) fonction, and then initialized, there is no trouble
Code:
05-31 09:24:11.442: V/SDL(11376): pixel format RGB_565
05-31 09:24:11.442: I/SDL(11376): SDL_Android_Init()
05-31 09:24:11.442: I/Main(11376): Entering main
05-31 09:24:13.817: I/SDLRenderer(11376): Entering SDLRenderer::init
05-31 09:24:13.817: I/SDLRenderer(11376): SDLRenderer::init -> About to create screen with w=704 h=480
05-31 09:24:13.817: I/SDL(11376): [STUB] GL_LoadLibrary
05-31 09:24:13.822: V/SDL(11376): Starting up OpenGL ES 2.0
05-31 09:24:13.827: D/libEGL(11376): loaded /system/lib/egl/libEGL_mali.so
05-31 09:24:13.832: D/libEGL(11376): loaded /system/lib/egl/libGLESv1_CM_mali.so
05-31 09:24:13.832: D/libEGL(11376): loaded /system/lib/egl/libGLESv2_mali.so
05-31 09:24:13.837: D/(11376): Device driver API match
05-31 09:24:13.837: D/(11376): Device driver API version: 10
05-31 09:24:13.837: D/(11376): User space API version: 10
05-31 09:24:13.837: D/(11376): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Fri May 4 10:32:42 KST 2012
05-31 09:24:13.862: I/SDL(11376): [STUB] GL_SetSwapInterval
05-31 09:24:13.862: I/SDL(11376): [STUB] GL_GetSwapInterval
05-31 09:24:13.932: I/SDLRenderer(11376): SDLRenderer::init -> screen created with w=704 h=480
05-31 09:24:13.932: I/SDLRenderer(11376): SDLRenderer::init -> About to create YUV Overlay with SDL_YV12_OVERLAY and w=704 h=480
05-31 09:24:13.932: I/SDLRenderer(11376): SDLRenderer::init -> YUV Overlay created with SDL_YV12_OVERLAY and w=704 h=480
BUT, if in the main function, I create a simple thread to do the previous job
(create a SDL renderer and initialize it) it crashes in SDL_SetVideoMode
Nothing else changed, the only change is the call of the renderer init in a thread rather than directly
in the main(argc, argv)…
Code:
05-31 10:33:04.462: V/SDL(23043): pixel format RGB_565
05-31 10:33:04.462: I/SDL(23043): SDL_Android_Init()
05-31 10:33:04.462: I/Main(23043): Entering main
05-31 10:33:05.882: I/Main(23043): Main: About to create thread DecodeVideo
05-31 10:33:05.882: I/Main(23043): Starting DecodeVideo
05-31 10:33:06.457: I/SDLRenderer(23043): Entering SDLRenderer::init
05-31 10:33:06.462: I/SDLRenderer(23043): SDLRenderer::init -> About to create screen with w=704 h=480
05-31 10:33:06.462: I/SDL(23043): [STUB] GL_LoadLibrary
05-31 10:33:06.462: A/libc(23043): Fatal signal 11 (SIGSEGV) at 0x00000364 (code=1)
Does anybody knows if there is something special to do to solve that ?
Thank you for any answer.
Zbb