fprintf(stderr, "Could not initialize SDL - exiting\n");
fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
int main(int argc, char **argv){    int flags, w, h;        /* 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) {#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        flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;        if (is_full_screen && fs_screen_width) {            w = fs_screen_width;            h = fs_screen_height;            flags |= SDL_FULLSCREEN;        } else {            w = screen_width;            h = screen_height;            flags |= SDL_RESIZABLE;        }        screen = SDL_SetVideoMode(w, h, 0, flags);        if (!screen) {            fprintf(stderr, "SDL: could not set video mode - exiting\n");            exit(1);        }        SDL_WM_SetCaption("FFplay", "FFplay");    }    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, file_iformat);    event_loop();    /* never returns */    return 0;}