diff options
author | al3x <al3x@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-09 18:42:36 +0000 |
---|---|---|
committer | al3x <al3x@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-09 18:42:36 +0000 |
commit | 1579a2072c73c3cd4c16dd09df5ab8fe61ee70db (patch) | |
tree | 98fdd2dd2d0999eb382ee95e3547abfa457f252f /libvo | |
parent | ad56707158f82d3537cc80b2e8a3e875ea679df0 (diff) |
init checks return value of sdl_open
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1081 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_sdl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c index 8bbe90db9c..026c213dfa 100644 --- a/libvo/vo_sdl.c +++ b/libvo/vo_sdl.c @@ -355,12 +355,12 @@ static int sdl_open (void *plugin, void *name) /* initialize the SDL Video system */ if (SDL_Init (SDL_INIT_VIDEO/*|SDL_INIT_NOPARACHUTE*/)) { - if(verbose > 2) printf("SDL: Initializing of SDL failed: %s.\n", SDL_GetError()); + printf("SDL: Initializing of SDL failed: %s.\n", SDL_GetError()); return -1; } SDL_VideoDriverName(priv->driver, 8); - if(verbose) printf("SDL: Using driver: %s\n", priv->driver); + printf("SDL: Using driver: %s\n", priv->driver); /* other default values */ #ifdef SDL_NOHWSURFACE if(verbose) printf("SDL: using software-surface\n"); @@ -595,6 +595,7 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) //static int sdl_setup (int width, int height) { + int ret; struct sdl_priv_s *priv = &sdl_priv; unsigned int sdl_format; SDL_Rect res; @@ -670,7 +671,8 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3 XCloseDisplay(XDisplay); } #endif - sdl_open (NULL, NULL); + if (sdl_open(NULL, NULL) != 0) + return -1; /* Set output window title */ SDL_WM_SetCaption (".: MPlayer : F = Fullscreen/Windowed : C = Cycle Fullscreen Resolutions :.", "SDL Video Out"); |