Commit 69f58958 authored by Stefano Sabatini's avatar 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: 's avatarStefano Sabatini <stefano.sabatini-lala@poste.it>
parent fbfcc8f1
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment