Image superposition on a video sequence is creating problem

Hi!

I have been trying to superpose a image on a video sequence display for
some reason. It creates the following problems (the problem is following
the code modification…):

SDL_Surface *screen,*image;
SMPEG *mpeg;

then mpeg is loaded to be a mped video while image is loaded to be a bmp
image.

I have done the following modification in the plaympeg.c file with
smpeg-0.4.4.

while ( ! done && ( pause || (SMPEG_status(mpeg) == SMPEG_PLAYING) ) )
{
/This part I am doing to load the white button image/
if (image->format->palette && screen->format->palette) {
SDL_SetColors(screen,image->format->palette->colors, 0,
image->format->palette->ncolors);
}
if(SDL_BlitSurface(image,NULL,screen,NULL) < 0)
fprintf(stderr,“BlitSurface error:
%s\n”,SDL_GetError());

        SDL_UpdateRect(screen, 0, 0, image->w, image->h);
        /*end of my modification of white bottun loading*/

        if(SDL_PollEvent(&test_event) && test_event.button.state ==

SDL_PRESSED) {
end_time=SDL_GetTicks();
printf(“The response time is %lf
secs\n”,(double)(end_time-str_time)/1000);
printf(“Current mouse position is: %d,%d\n”,
test_event.button.x,test_event.button.y);
break; /Use exit(0) instead/
}
}

There is one more problem : if I use break, the program hangs and I have
to physically kill it using “kill” and CTRL-C does not work. However, if
I use ‘exit’ instead of ‘break’, then the program terminates properly.
However, for my purpose, I would like to use break. Any suggestion here?

How do I place the image not at the beginning of the rectangle but any
where on the display window?

Thanks and regards,
pati