Crash when using SDL_OPENGL flag

Hi, has anybody seen this crash in SDL & knows how to
fix it?

I’m using plaympeg
(http://www.lokigames.com/development/smpeg.php3), an
mpeg player & am trying to include the Opengl
attribute when calling SDL_SetVideoMode. The code
crashes in

int SDL_DisplayYUVOverlay(SDL_Overlay *overlay,
SDL_Rect *dstrect)
{
return overlay->hwfuncs->Display(current_video,
overlay, dstrect);
}

the application code fragment is:
video_flags = SDL_SWSURFACE;
if ( fullscreen ) {
video_flags =
SDL_FULLSCREEN|SDL_DOUBLEBUF|SDL_HWSURFACE;
}
video_flags |= SDL_ASYNCBLIT;
video_flags |= SDL_RESIZABLE;
//video_flags |= SDL_OPENGL;
screen = SDL_SetVideoMode(width, height,
video_bpp, video_flags);
if ( screen == NULL ) {
fprintf(stderr, “Unable to set %dx%d
video mode: %s\n”,
width, height,
SDL_GetError());
continue;
}
SDL_WM_SetCaption(argv[i], “plaympeg”);
if ( screen->flags & SDL_FULLSCREEN ) {
SDL_ShowCursor(0);
}
SMPEG_setdisplay(mpeg, screen, NULL,
update);

It works fine without the
video_flags |= SDL_OPENGL; statement.

if i add it in , it crashes… any suggestions? am i
not using it properly?__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

SDL_SetVideoMode does’nt return a useful surface in SDL_OPENGL mode.
You can try using SDL_OPENGLBLIT, or having smpeg display to a surface
in memory and the displaying it to the display with a GL copy pixel
function or using it as a texture map.

Jacob Zachariah wrote:> Hi, has anybody seen this crash in SDL & knows how to

fix it?

I’m using plaympeg
(http://www.lokigames.com/development/smpeg.php3), an
mpeg player & am trying to include the Opengl
attribute when calling SDL_SetVideoMode. The code
crashes in

int SDL_DisplayYUVOverlay(SDL_Overlay *overlay,
SDL_Rect *dstrect)
{
return overlay->hwfuncs->Display(current_video,
overlay, dstrect);
}

the application code fragment is:
video_flags = SDL_SWSURFACE;
if ( fullscreen ) {
video_flags =
SDL_FULLSCREEN|SDL_DOUBLEBUF|SDL_HWSURFACE;
}
video_flags |= SDL_ASYNCBLIT;
video_flags |= SDL_RESIZABLE;
//video_flags |= SDL_OPENGL;
screen = SDL_SetVideoMode(width, height,
video_bpp, video_flags);
if ( screen == NULL ) {
fprintf(stderr, “Unable to set %dx%d
video mode: %s\n”,
width, height,
SDL_GetError());
continue;
}
SDL_WM_SetCaption(argv[i], “plaympeg”);
if ( screen->flags & SDL_FULLSCREEN ) {
SDL_ShowCursor(0);
}
SMPEG_setdisplay(mpeg, screen, NULL,
update);

It works fine without the
video_flags |= SDL_OPENGL; statement.

if i add it in , it crashes… any suggestions? am i
not using it properly?


Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Also just noticed there was a thread on this list where the latest
version of SDL breaks SMPEG in OGL mode, a patch has already been
sumbitted, not sure if it has gone through CVS though.

Jacob Zachariah wrote:> Hi, has anybody seen this crash in SDL & knows how to

fix it?

I’m using plaympeg
(http://www.lokigames.com/development/smpeg.php3), an
mpeg player & am trying to include the Opengl
attribute when calling SDL_SetVideoMode. The code
crashes in

int SDL_DisplayYUVOverlay(SDL_Overlay *overlay,
SDL_Rect *dstrect)
{
return overlay->hwfuncs->Display(current_video,
overlay, dstrect);
}

the application code fragment is:
video_flags = SDL_SWSURFACE;
if ( fullscreen ) {
video_flags =
SDL_FULLSCREEN|SDL_DOUBLEBUF|SDL_HWSURFACE;
}
video_flags |= SDL_ASYNCBLIT;
video_flags |= SDL_RESIZABLE;
//video_flags |= SDL_OPENGL;
screen = SDL_SetVideoMode(width, height,
video_bpp, video_flags);
if ( screen == NULL ) {
fprintf(stderr, “Unable to set %dx%d
video mode: %s\n”,
width, height,
SDL_GetError());
continue;
}
SDL_WM_SetCaption(argv[i], “plaympeg”);
if ( screen->flags & SDL_FULLSCREEN ) {
SDL_ShowCursor(0);
}
SMPEG_setdisplay(mpeg, screen, NULL,
update);

It works fine without the
video_flags |= SDL_OPENGL; statement.

if i add it in , it crashes… any suggestions? am i
not using it properly?


Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Also just noticed there was a thread on this list where the latest
version of SDL breaks SMPEG in OGL mode, a patch has already been
sumbitted, not sure if it has gone through CVS though.

Yep, try updating SDL from CVS, it should be fixed.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hello !

Also just noticed there was a thread on this list where the latest
version of SDL breaks SMPEG in OGL mode, a patch has already been
sumbitted, not sure if it has gone through CVS though.

@Sam:

It would be cool when you fix the SMPEG scripts to build correctly
on CYGWIN and MSYS in the new year :slight_smile:

CU

It would be cool when you fix the SMPEG scripts to build correctly
on CYGWIN and MSYS in the new year :slight_smile:

Can you tell me the errors, using the icculus.org branch and not
lokigames.com’s build?

Thanks,
–ryan.

Hello !

Can you tell me the errors, using the icculus.org branch and not
lokigames.com’s build?

Okay. Here is it :

http://www.synolution.com/~wizard/tmp/Error.txt

CU

Can you tell me the errors, using the icculus.org branch and not
lokigames.com’s build?

Okay. Here is it :

http://www.synolution.com/~wizard/tmp/Error.txt

Okay, I took a look at the problem, and got it working here. Pull the
latest smpeg from icculus.org’s CVS and it should be fixed.

Thanks to everyone for the help on getting SDL building on Cygwin!

If there’re further problems, we should take this discussion to the
proper mailing list (blank email to smpeg-subscribe at icculus.org to get
on the list).

–ryan.