static int video_open(VideoState *is){

    int flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;

    int w,h;



    if(is_full_screen) flags |= SDL_FULLSCREEN;

    else               flags |= SDL_RESIZABLE;



    if (is_full_screen && fs_screen_width) {

        w = fs_screen_width;

        h = fs_screen_height;

    } else if(!is_full_screen && screen_width){

        w = screen_width;

        h = screen_height;

    }else if (is->video_st && is->video_st->codec->width){

        w = is->video_st->codec->width;

        h = is->video_st->codec->height;

    } else {

        w = 640;

        h = 480;

    }

#ifndef SYS_DARWIN

    screen = SDL_SetVideoMode(w, h, 0, flags);

#else

    /* setting bits_per_pixel = 0 or 32 causes blank video on OS X */

    screen = SDL_SetVideoMode(w, h, 24, flags);

#endif

    if (!screen) {

        fprintf(stderr, "SDL: could not set video mode - exiting\n");

        return -1;

    }

    SDL_WM_SetCaption("FFplay", "FFplay");



    is->width = screen->w;

    is->height = screen->h;



    return 0;

}

static int video_open(VideoState *is){

    int flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;

    int w,h;



    if(is_full_screen) flags |= SDL_FULLSCREEN;

    else               flags |= SDL_RESIZABLE;



    if (is_full_screen && fs_screen_width) {

        w = fs_screen_width;

        h = fs_screen_height;

    } else if(!is_full_screen && screen_width){

        w = screen_width;

        h = screen_height;

    }else if (is->video_st && is->video_st->codec->width){

        w = is->video_st->codec->width;

        h = is->video_st->codec->height;

    } else {

        w = 640;

        h = 480;

    }

#ifndef SYS_DARWIN

    screen = SDL_SetVideoMode(w, h, 0, flags);

#else

    

    screen = SDL_SetVideoMode(w, h, 24, flags);

#endif

    if (!screen) {

        fprintf(stderr, "SDL: could not set video mode - exiting\n");

        return -1;

    }

    SDL_WM_SetCaption("FFplay", "FFplay");



    is->width = screen->w;

    is->height = screen->h;



    return 0;

}

static int FUNC_0(VideoState *VAR_0){

    int VAR_1 = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;

    int VAR_2,VAR_3;



    if(is_full_screen) VAR_1 |= SDL_FULLSCREEN;

    else               VAR_1 |= SDL_RESIZABLE;



    if (is_full_screen && fs_screen_width) {

        VAR_2 = fs_screen_width;

        VAR_3 = fs_screen_height;

    } else if(!is_full_screen && screen_width){

        VAR_2 = screen_width;

        VAR_3 = screen_height;

    }else if (VAR_0->video_st && VAR_0->video_st->codec->width){

        VAR_2 = VAR_0->video_st->codec->width;

        VAR_3 = VAR_0->video_st->codec->height;

    } else {

        VAR_2 = 640;

        VAR_3 = 480;

    }

#ifndef SYS_DARWIN

    screen = SDL_SetVideoMode(VAR_2, VAR_3, 0, VAR_1);

#else

    

    screen = SDL_SetVideoMode(VAR_2, VAR_3, 24, VAR_1);

#endif

    if (!screen) {

        fprintf(stderr, "SDL: could not set video mode - exiting\n");

        return -1;

    }

    SDL_WM_SetCaption("FFplay", "FFplay");



    VAR_0->width = screen->VAR_2;

    VAR_0->height = screen->VAR_3;



    return 0;

}

static int FUNC_0(VideoState *VAR_0){ int VAR_1 = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL; int VAR_2,VAR_3; if(is_full_screen) VAR_1 |= SDL_FULLSCREEN; else               VAR_1 |= SDL_RESIZABLE; if (is_full_screen && fs_screen_width) { VAR_2 = fs_screen_width; VAR_3 = fs_screen_height; } else if(!is_full_screen && screen_width){ VAR_2 = screen_width; VAR_3 = screen_height; }else if (VAR_0->video_st && VAR_0->video_st->codec->width){ VAR_2 = VAR_0->video_st->codec->width; VAR_3 = VAR_0->video_st->codec->height; } else { VAR_2 = 640; VAR_3 = 480; } #ifndef SYS_DARWIN
screen = SDL_SetVideoMode(VAR_2, VAR_3, 0, VAR_1); #else
screen = SDL_SetVideoMode(VAR_2, VAR_3, 24, VAR_1); #endif
if (!screen) { fprintf(stderr, "SDL: could not set video mode - exiting\n"); return -1; } SDL_WM_SetCaption("FFplay", "FFplay"); VAR_0->width = screen->VAR_2; VAR_0->height = screen->VAR_3; return 0; }