[FFmpeg-cvslog] ffplay: avoid SIGFPE exception in SDL_DisplayYUVOverlay
Stefano Sabatini
git at videolan.org
Sun Apr 24 23:12:19 CEST 2011
ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Fri Apr 22 17:11:23 2011 +0200| [69f58958ce8f81b153b14c60959ba37d6bf0b8cf] | committer: Stefano Sabatini
ffplay: avoid SIGFPE exception in SDL_DisplayYUVOverlay
In video_image_display(), fix exception occurring when the size of the
rectangle passed to SDL_DisplayYUVOverlay() is 0x0, which happens when
interactively resizing the SDL window.
This is done by forcing the minimum size to 1x1.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=69f58958ce8f81b153b14c60959ba37d6bf0b8cf
---
ffplay.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 680215a..b342732 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -752,8 +752,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
More information about the ffmpeg-cvslog
mailing list