screen = SDL_SetVideoMode(screen_width, screen_height, 0, SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL); if (!screen) { fprintf(stderr, "SDL: could not set video mode - exiting\n"); exit(1); } SDL_WM_SetCaption("FFplay", "FFplay");
int main(int argc, char **argv){    int flags;        /* register all codecs, demux and protocols */    av_register_all();    parse_options(argc, argv, options);    if (!input_filename)        show_help();    if (display_disable) {        video_disable = 1;    }    flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;#ifndef CONFIG_WIN32    flags |= SDL_INIT_EVENTTHREAD; /* Not supported on win32 */#endif    if (SDL_Init (flags)) {        fprintf(stderr, "Could not initialize SDL - exiting\n");        exit(1);    }    if (!display_disable) {        screen = SDL_SetVideoMode(screen_width, screen_height, 0,                                   SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL);        if (!screen) {            fprintf(stderr, "SDL: could not set video mode - exiting\n");            exit(1);        }        SDL_WM_SetCaption("FFplay", "FFplay");#ifdef HAVE_X11        /* save the screen resolution... SDL should allow full screen           by resizing the window */        {            Display *dpy;            dpy = XOpenDisplay(NULL);            if (dpy) {                fs_screen_width = DisplayWidth(dpy, DefaultScreen(dpy));                fs_screen_height = DisplayHeight(dpy, DefaultScreen(dpy));		XCloseDisplay(dpy);            }        }#endif    }    SDL_EventState(SDL_ACTIVEEVENT, SDL_IGNORE);    SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);    SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE);    SDL_EventState(SDL_USEREVENT, SDL_IGNORE);    cur_stream = stream_open(input_filename);    event_loop();    /* never returns */    return 0;}