[FFmpeg-devel] [PATCH] ffplay: avoid SIGFPE exception in SDL_DisplayYUVOverlay
Stefano Sabatini
stefano.sabatini-lala at poste.it
Fri Apr 22 17:42:52 CEST 2011
In video_image_display(), fix exception occurring when the size of the
rectangle passed to SDL_DisplayYUVOverlay() is 0x0. This is done by
forcing the minimum size to 1x1.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala at poste.it>
---
ffplay.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 4a67c8f..2eb3d41 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -753,8 +753,8 @@ static void video_image_display(VideoState *is)
}
rect.x = is->xleft + x;
rect.y = is->ytop + y;
- rect.w = width;
- rect.h = height;
+ rect.w = FFMAX(width, 1);
+ rect.h = FFMAX(height, 1);
SDL_DisplayYUVOverlay(vp->bmp, &rect);
} else {
#if 0
--
1.7.2.3
More information about the ffmpeg-devel
mailing list