[SDL] SDL and SMPEG audio issue

shu it3husu at ituniv.se
Thu Feb 10 07:30:59 PST 2005


I am making a program that uses SDL and SMPEG to play an MPEG.  I am running
into a problem where on the second or sometimes third iteration of the while
loop, I receive an error.  Debug shows that the error is occuring in the
SMPEG_new line.  The example is below and I suspect it is to do with the Audio
initialization.  However, if I try to initialize the audio with SDL_INIT_AUDIO
and then switch the third argument of SMPEG_new to 0, the video moves very
slowly and without sound, eventually crashing with a Passed NULL mutex error.

The simple structure of the program:

EXAMPLE #1:

(SDL_Init(SDL_INIT_VIDEO))

while(1){

mpeg = SMPEG_new(moviebuf, &info, 1); /* moviebuf is movie file */
SMPEG_setdisplay (mpeg, screen, NULL, update_frames);
SMPEG_play(mpeg);

SMPEG_delete(mpeg);
}

SDL_FreeSurface(screen);
SDL_Quit();


ERROR FOR THIS EXAMPLE IS: Fatal signal: Segmentation Fault (SDL Parachute
Deployed)


Any ideas?  Very appreciative for any help!
Best,
Shu

it3husu at ituniv.se






More information about the SDL mailing list