OSDN Git Service

Do not crash if SDL_SetVideoMode() fails.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 16 Jun 2011 21:21:19 +0000 (23:21 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 16 Jun 2011 21:21:19 +0000 (23:21 +0200)
ffplay.c

index fa23884..31a6832 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -945,7 +945,7 @@ static int video_open(VideoState *is){
 #endif
     if (!screen) {
         fprintf(stderr, "SDL: could not set video mode - exiting\n");
-        return -1;
+        do_exit();
     }
     if (!window_title)
         window_title = input_filename;