Index: ffplay.c
===================================================================
--- ffplay.c	(revision 24625)
+++ ffplay.c	(working copy)
@@ -1290,6 +1290,9 @@
     }
 }
 
+// forward
+static void do_exit(void);
+
 /* allocate a picture (needs to do that in main thread to avoid
    potential locking problems */
 static void alloc_picture(void *opaque)
@@ -1319,6 +1322,13 @@
     vp->bmp = SDL_CreateYUVOverlay(vp->width, vp->height,
                                    SDL_YV12_OVERLAY,
                                    screen);
+    if (!vp->bmp || vp->bmp->w < vp->width || vp->bmp->h < vp->height ||
+        vp->bmp->pitches[0] < vp->width ) {
+        fprintf(stderr, "Error: your video system does not support an image\n"
+                        "size of %dx%d pixels. Try using -vf \"scale=pix_w:pix_h\"\n"
+                        "to reduce the image size.\n", vp->width, vp->height );
+        do_exit();
+    }
 
     SDL_LockMutex(is->pictq_mutex);
     vp->allocated = 1;
