mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
Fix SDL crash on specific hardware.
Patch by Mike Scheutzow, mjs973 optonline net Originally committed as revision 24801 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f7b8c81460
commit
cb036f905f
8
ffplay.c
8
ffplay.c
@ -1373,6 +1373,14 @@ static void alloc_picture(void *opaque)
|
||||
vp->bmp = SDL_CreateYUVOverlay(vp->width, vp->height,
|
||||
SDL_YV12_OVERLAY,
|
||||
screen);
|
||||
if (!vp->bmp || vp->bmp->pitches[0] < vp->width) {
|
||||
/* SDL allocates a buffer smaller than requested if the video
|
||||
* overlay hardware is unable to support the requested size. */
|
||||
fprintf(stderr, "Error: the video system does not support an image\n"
|
||||
"size of %dx%d pixels. Try using -vf \"scale=w:h\"\n"
|
||||
"to reduce the image size.\n", vp->width, vp->height );
|
||||
do_exit();
|
||||
}
|
||||
|
||||
SDL_LockMutex(is->pictq_mutex);
|
||||
vp->allocated = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user