[SCM] libav/experimental: Fix SDL crash on specific hardware.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:14:06 UTC 2013
The following commit has been merged in the experimental branch:
commit cb036f905f6ffa7b0dfdb9c35471a8280e00214e
Author: Mike Scheutzow <scheutzow at alcatel-lucent.com>
Date: Tue Aug 17 07:47:44 2010 +0000
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
diff --git a/ffplay.c b/ffplay.c
index e5b0cce..8244dfa 100644
--- a/ffplay.c
+++ b/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;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list